pax_global_header00006660000000000000000000000064131761526140014520gustar00rootroot0000000000000052 comment=932d030d6fa022a4ad8ddae1e1e6bfff9f6af063 cu2qu-1.3.0/000077500000000000000000000000001317615261400125605ustar00rootroot00000000000000cu2qu-1.3.0/.codecov.yml000066400000000000000000000001151317615261400150000ustar00rootroot00000000000000comment: false coverage: status: project: off patch: off cu2qu-1.3.0/.coveragerc000066400000000000000000000014641317615261400147060ustar00rootroot00000000000000[run] # measure 'branch' coverage in addition to 'statement' coverage # See: http://coverage.readthedocs.org/en/coverage-4.0.3/branch.html#branch branch = True # list of directories or packages to measure source = cu2qu # these are treated as equivalent when combining data [paths] source = Lib/cu2qu .tox/*/lib/python*/site-packages/cu2qu .tox/pypy*/site-packages/cu2qu [report] # Regexes for lines to exclude from consideration exclude_lines = # keywords to use in inline comments to skip coverage pragma: no cover # don't complain if tests don't hit defensive assertion code raise AssertionError raise NotImplementedError # don't complain if non-runnable code isn't run if 0: if __name__ == .__main__.: # ignore source code that can’t be found ignore_errors = True cu2qu-1.3.0/.gitignore000066400000000000000000000003221317615261400145450ustar00rootroot00000000000000# Byte-compiled and optimized files __pycache__/ *.py[co] *$py.class # Packaging *.egg-info *.eggs build dist # Unit test and coverage files .cache .coverage .coverage.* .tox htmlcov # OS X Finder .DS_Store cu2qu-1.3.0/.pyup.yml000066400000000000000000000002501317615261400143530ustar00rootroot00000000000000# controls the frequency of updates (undocumented beta feature) schedule: every week # do not pin dependencies unless they have explicit version specifiers pin: False cu2qu-1.3.0/.travis.yml000066400000000000000000000021541317615261400146730ustar00rootroot00000000000000sudo: false language: python python: - "2.7" - "3.6" branches: only: - master - /^v\d+\.\d+.*$/ install: pip install tox-travis script: tox after_success: tox -e codecov deploy: # deploy to PyPI on tags provider: pypi server: https://upload.pypi.org/legacy/ on: repo: googlei18n/cu2qu tags: true all_branches: true python: 3.6 user: anthrotype password: secure: LdEsho2OyiHKOsqjdwa1s6LQNuzbiHJGpk7L+Qn6XV8bmzznI15Z5yaC4kO8vE0ZfE0dwTcdA4BrjUBxFZnmWZtGp/la9pcwUF5fX8LnKwRsw8oPHJZNvvi9IEgnIg68VUJ4X787+hJKilQKhyE+J3UKDrJ0on6UJjpTciO8Tsins80EMD5wB000VriCXiZ3wvaCm/yaXDeGKkb8Us3NWT8pshgZ2SpoQyIJ1pik7p4UtjcZM2tPKbCPkim17UCOYQ/0II4KmoT19JGceC0xWbD0cssZDM2rd0vIQ+OMQTD7fkoTE2pY9L3dLDyHamJCECq/ZX0rNgFUBylEJq1+gin+8g81vXsewzBZA5Zc4/D+ER0INdLF8LbLAZOqu40eMa2X6bu3w++Vo8dK0wZibVlrA3EnBKcvTePTFuXnlAPuE252lsq+zn1nO8SO6xfzvB4JF3iB7GO7dajnR+8C+m9ctO/Lx043+FoxH607N1E/WOsFvOCPXQhpeNJZHyPtA4no++O0fp3KcKkvvJrt5nVxs55AT+p5uAXvfOATwwjaZYivayeZj2ICeFhh3A2LciMOvaqqXAJ64zFmjnmgVYyJPc7Xh30cnsvdKOR5QR35gzAZfEAyBeYIckIyIwpF9N+ogtGMQvHSprkbf1Bm6Hpmhq/XTkNzW+SM8+3/cfI= distributions: sdist bdist_wheel cu2qu-1.3.0/CONTRIBUTING.md000066400000000000000000000026521317615261400150160ustar00rootroot00000000000000Want to contribute? Great! First, read this page (including the small print at the end). ### Before you contribute Before we can use your code, you must sign the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things—for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on. ### Code reviews All submissions, including submissions by project members, require review. We use Github pull requests for this purpose. ### The small print Contributions made by corporations are covered by a different agreement than the one above, the [Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). cu2qu-1.3.0/LICENSE000066400000000000000000000261351317615261400135740ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. cu2qu-1.3.0/Lib/000077500000000000000000000000001317615261400132665ustar00rootroot00000000000000cu2qu-1.3.0/Lib/cu2qu/000077500000000000000000000000001317615261400143255ustar00rootroot00000000000000cu2qu-1.3.0/Lib/cu2qu/__init__.py000066400000000000000000000200041317615261400164320ustar00rootroot00000000000000# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function, division, absolute_import __version__ = "1.3.0" __all__ = ['curve_to_quadratic', 'curves_to_quadratic'] MAX_N = 100 class Cu2QuError(Exception): pass class ApproxNotFoundError(Cu2QuError): def __init__(self, curve): message = "no approximation found: %s" % curve super(Cu2QuError, self).__init__(message) self.curve = curve def dot(v1, v2): """Return the dot product of two vectors.""" return (v1 * v2.conjugate()).real def calc_cubic_points(a, b, c, d): _1 = d _2 = (c / 3.0) + d _3 = (b + c) / 3.0 + _2 _4 = a + d + c + b return _1, _2, _3, _4 def calc_cubic_parameters(p0, p1, p2, p3): c = (p1 - p0) * 3.0 b = (p2 - p1) * 3.0 - c d = p0 a = p3 - d - c - b return a, b, c, d def split_cubic_into_n_iter(p0, p1, p2, p3, n): # Hand-coded special-cases if n == 2: return iter(split_cubic_into_two(p0, p1, p2, p3)) if n == 3: return iter(split_cubic_into_three(p0, p1, p2, p3)) if n == 4: a, b = split_cubic_into_two(p0, p1, p2, p3) return iter(split_cubic_into_two(*a) + split_cubic_into_two(*b)) if n == 6: a, b = split_cubic_into_two(p0, p1, p2, p3) return iter(split_cubic_into_three(*a) + split_cubic_into_three(*b)) return _split_cubic_into_n_gen(p0,p1,p2,p3,n) def _split_cubic_into_n_gen(p0, p1, p2, p3, n): a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3) dt = 1 / n delta_2 = dt * dt delta_3 = dt * delta_2 for i in range(n): t1 = i * dt t1_2 = t1 * t1 # calc new a, b, c and d a1 = a * delta_3 b1 = (3*a*t1 + b) * delta_2 c1 = (2*b*t1 + c + 3*a*t1_2) * dt d1 = a*t1*t1_2 + b*t1_2 + c*t1 + d yield calc_cubic_points(a1, b1, c1, d1) def split_cubic_into_two(p0, p1, p2, p3): mid = (p0 + 3 * (p1 + p2) + p3) * .125 deriv3 = (p3 + p2 - p1 - p0) * .125 return ((p0, (p0 + p1) * .5, mid - deriv3, mid), (mid, mid + deriv3, (p2 + p3) * .5, p3)) def split_cubic_into_three(p0, p1, p2, p3, _27=1/27): # we define 1/27 as a keyword argument so that it will be evaluated only # once but still in the scope of this function mid1 = (8*p0 + 12*p1 + 6*p2 + p3) * _27 deriv1 = (p3 + 3*p2 - 4*p0) * _27 mid2 = (p0 + 6*p1 + 12*p2 + 8*p3) * _27 deriv2 = (4*p3 - 3*p1 - p0) * _27 return ((p0, (2*p0 + p1) / 3, mid1 - deriv1, mid1), (mid1, mid1 + deriv1, mid2 - deriv2, mid2), (mid2, mid2 + deriv2, (p2 + 2*p3) / 3, p3)) def cubic_approx_control(p, t): """Approximate a cubic bezier curve with a quadratic one. Returns the candidate control point.""" p1 = p[0] + (p[1] - p[0]) * 1.5 p2 = p[3] + (p[2] - p[3]) * 1.5 return p1 + (p2 - p1) * t def calc_intersect(a, b, c, d): """Calculate the intersection of ab and cd, given a, b, c, d.""" ab = b - a cd = d - c p = ab * 1j try: h = dot(p, a - c) / dot(p, cd) except ZeroDivisionError: return None return c + cd * h def cubic_farthest_fit_inside(p0, p1, p2, p3, tolerance): """Returns True if the cubic Bezier p entirely lies within a distance tolerance of origin, False otherwise. Assumes that p0 and p3 do fit within tolerance of origin, and just checks the inside of the curve.""" # First check p2 then p1, as p2 has higher error early on. if abs(p2) <= tolerance and abs(p1) <= tolerance: return True # Split. mid = (p0 + 3 * (p1 + p2) + p3) * .125 if abs(mid) > tolerance: return False deriv3 = (p3 + p2 - p1 - p0) * .125 return (cubic_farthest_fit_inside(p0, (p0+p1)*.5, mid-deriv3, mid, tolerance) and cubic_farthest_fit_inside(mid, mid+deriv3, (p2+p3)*.5, p3, tolerance)) def cubic_approx_quadratic(cubic, tolerance, _2_3=2/3): """Return the uniq quadratic approximating cubic that maintains endpoint tangents if that is within tolerance, None otherwise.""" # we define 2/3 as a keyword argument so that it will be evaluated only # once but still in the scope of this function q1 = calc_intersect(*cubic) if q1 is None: return None c0 = cubic[0] c3 = cubic[3] c1 = c0 + (q1 - c0) * _2_3 c2 = c3 + (q1 - c3) * _2_3 if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): return None return c0, q1, c3 def cubic_approx_spline(cubic, n, tolerance, _2_3=2/3): """Approximate a cubic bezier curve with a spline of n quadratics. Returns None if no quadratic approximation is found which lies entirely within a distance `tolerance` from the original curve. """ # we define 2/3 as a keyword argument so that it will be evaluated only # once but still in the scope of this function if n == 1: return cubic_approx_quadratic(cubic, tolerance) cubics = split_cubic_into_n_iter(cubic[0], cubic[1], cubic[2], cubic[3], n) # calculate the spline of quadratics and check errors at the same time. next_cubic = next(cubics) next_q1 = cubic_approx_control(next_cubic, 0) q2 = cubic[0] d1 = 0j spline = [cubic[0], next_q1] for i in range(1, n+1): # Current cubic to convert c0, c1, c2, c3 = next_cubic # Current quadratic approximation of current cubic q0 = q2 q1 = next_q1 if i < n: next_cubic = next(cubics) next_q1 = cubic_approx_control(next_cubic, i / (n-1)) spline.append(next_q1) q2 = (q1 + next_q1) * .5 else: q2 = c3 # End-point deltas d0 = d1 d1 = q2 - c3 if (abs(d1) > tolerance or not cubic_farthest_fit_inside(d0, q0 + (q1 - q0) * _2_3 - c1, q2 + (q1 - q2) * _2_3 - c2, d1, tolerance)): return None spline.append(cubic[3]) return spline def curve_to_quadratic(curve, max_err): """Return a quadratic spline approximating this cubic bezier. Raise 'ApproxNotFoundError' if no suitable approximation can be found with the given parameters. """ curve = [complex(*p) for p in curve] for n in range(1, MAX_N + 1): spline = cubic_approx_spline(curve, n, max_err) if spline is not None: # done. go home return [(s.real, s.imag) for s in spline] raise ApproxNotFoundError(curve) def curves_to_quadratic(curves, max_errors): """Return quadratic splines approximating these cubic beziers. Raise 'ApproxNotFoundError' if no suitable approximation can be found for all curves with the given parameters. """ curves = [[complex(*p) for p in curve] for curve in curves] assert len(max_errors) == len(curves) l = len(curves) splines = [None] * l last_i = i = 0 n = 1 while True: spline = cubic_approx_spline(curves[i], n, max_errors[i]) if spline is None: if n == MAX_N: break n += 1 last_i = i continue splines[i] = spline i = (i + 1) % l if i == last_i: # done. go home return [[(s.real, s.imag) for s in spline] for spline in splines] raise ApproxNotFoundError(curves) cu2qu-1.3.0/Lib/cu2qu/pens.py000066400000000000000000000230631317615261400156500ustar00rootroot00000000000000from __future__ import print_function, division, absolute_import from cu2qu import curve_to_quadratic from fontTools.pens.basePen import AbstractPen, decomposeSuperBezierSegment from fontTools.pens.reverseContourPen import ReverseContourPen from ufoLib.pointPen import BasePointToSegmentPen from ufoLib.pointPen import ReverseContourPointPen class Cu2QuPen(AbstractPen): """ A filter pen to convert cubic bezier curves to quadratic b-splines using the FontTools SegmentPen protocol. other_pen: another SegmentPen used to draw the transformed outline. max_err: maximum approximation error in font units. reverse_direction: flip the contours' direction but keep starting point. stats: a dictionary counting the point numbers of quadratic segments. ignore_single_points: don't emit contours containing only a single point NOTE: The "ignore_single_points" argument is deprecated since v1.3.0, which dropped Robofab subpport. It's no longer needed to special-case UFO2-style anchors (aka "named points") when using ufoLib >= 2.0, as these are no longer drawn onto pens as single-point contours, but are handled separately as anchors. """ def __init__(self, other_pen, max_err, reverse_direction=False, stats=None, ignore_single_points=False): if reverse_direction: self.pen = ReverseContourPen(other_pen) else: self.pen = other_pen self.max_err = max_err self.stats = stats if ignore_single_points: import warnings warnings.warn("ignore_single_points is deprecated and " "will be removed in future versions", UserWarning, stacklevel=2) self.ignore_single_points = ignore_single_points self.start_pt = None self.current_pt = None def _check_contour_is_open(self): if self.current_pt is None: raise AssertionError("moveTo is required") def _check_contour_is_closed(self): if self.current_pt is not None: raise AssertionError("closePath or endPath is required") def _add_moveTo(self): if self.start_pt is not None: self.pen.moveTo(self.start_pt) self.start_pt = None def moveTo(self, pt): self._check_contour_is_closed() self.start_pt = self.current_pt = pt if not self.ignore_single_points: self._add_moveTo() def lineTo(self, pt): self._check_contour_is_open() self._add_moveTo() self.pen.lineTo(pt) self.current_pt = pt def qCurveTo(self, *points): self._check_contour_is_open() n = len(points) if n == 1: self.lineTo(points[0]) elif n > 1: self._add_moveTo() self.pen.qCurveTo(*points) self.current_pt = points[-1] else: raise AssertionError("illegal qcurve segment point count: %d" % n) def _curve_to_quadratic(self, pt1, pt2, pt3): curve = (self.current_pt, pt1, pt2, pt3) quadratic = curve_to_quadratic(curve, self.max_err) if self.stats is not None: n = str(len(quadratic) - 2) self.stats[n] = self.stats.get(n, 0) + 1 self.qCurveTo(*quadratic[1:]) def curveTo(self, *points): self._check_contour_is_open() n = len(points) if n == 3: # this is the most common case, so we special-case it self._curve_to_quadratic(*points) elif n > 3: for segment in decomposeSuperBezierSegment(points): self._curve_to_quadratic(*segment) elif n == 2: self.qCurveTo(*points) elif n == 1: self.lineTo(points[0]) else: raise AssertionError("illegal curve segment point count: %d" % n) def closePath(self): self._check_contour_is_open() if self.start_pt is None: # if 'start_pt' is _not_ None, we are ignoring single-point paths self.pen.closePath() self.current_pt = self.start_pt = None def endPath(self): self._check_contour_is_open() if self.start_pt is None: self.pen.endPath() self.current_pt = self.start_pt = None def addComponent(self, glyphName, transformation): self._check_contour_is_closed() self.pen.addComponent(glyphName, transformation) class Cu2QuPointPen(BasePointToSegmentPen): """ A filter pen to convert cubic bezier curves to quadratic b-splines using the RoboFab PointPen protocol. other_point_pen: another PointPen used to draw the transformed outline. max_err: maximum approximation error in font units. reverse_direction: reverse the winding direction of all contours. stats: a dictionary counting the point numbers of quadratic segments. """ def __init__(self, other_point_pen, max_err, reverse_direction=False, stats=None): BasePointToSegmentPen.__init__(self) if reverse_direction: self.pen = ReverseContourPointPen(other_point_pen) else: self.pen = other_point_pen self.max_err = max_err self.stats = stats def _flushContour(self, segments): assert len(segments) >= 1 closed = segments[0][0] != "move" new_segments = [] prev_points = segments[-1][1] prev_on_curve = prev_points[-1][0] for segment_type, points in segments: if segment_type == 'curve': for sub_points in self._split_super_bezier_segments(points): on_curve, smooth, name, kwargs = sub_points[-1] bcp1, bcp2 = sub_points[0][0], sub_points[1][0] cubic = [prev_on_curve, bcp1, bcp2, on_curve] quad = curve_to_quadratic(cubic, self.max_err) if self.stats is not None: n = str(len(quad) - 2) self.stats[n] = self.stats.get(n, 0) + 1 new_points = [(pt, False, None, {}) for pt in quad[1:-1]] new_points.append((on_curve, smooth, name, kwargs)) new_segments.append(["qcurve", new_points]) prev_on_curve = sub_points[-1][0] else: new_segments.append([segment_type, points]) prev_on_curve = points[-1][0] if closed: # the BasePointToSegmentPen.endPath method that calls _flushContour # rotates the point list of closed contours so that they end with # the first on-curve point. We restore the original starting point. new_segments = new_segments[-1:] + new_segments[:-1] self._drawPoints(new_segments) def _split_super_bezier_segments(self, points): sub_segments = [] # n is the number of control points n = len(points) - 1 if n == 2: # a simple bezier curve segment sub_segments.append(points) elif n > 2: # a "super" bezier; decompose it on_curve, smooth, name, kwargs = points[-1] num_sub_segments = n - 1 for i, sub_points in enumerate(decomposeSuperBezierSegment([ pt for pt, _, _, _ in points])): new_segment = [] for point in sub_points[:-1]: new_segment.append((point, False, None, {})) if i == (num_sub_segments - 1): # the last on-curve keeps its original attributes new_segment.append((on_curve, smooth, name, kwargs)) else: # on-curves of sub-segments are always "smooth" new_segment.append((sub_points[-1], True, None, {})) sub_segments.append(new_segment) else: raise AssertionError( "expected 2 control points, found: %d" % n) return sub_segments def _drawPoints(self, segments): pen = self.pen pen.beginPath() last_offcurves = [] for i, (segment_type, points) in enumerate(segments): if segment_type in ("move", "line"): assert len(points) == 1, ( "illegal line segment point count: %d" % len(points)) pt, smooth, name, kwargs = points[0] pen.addPoint(pt, segment_type, smooth, name, **kwargs) elif segment_type == "qcurve": assert len(points) >= 2, ( "illegal qcurve segment point count: %d" % len(points)) offcurves = points[:-1] if offcurves: if i == 0: # any off-curve points preceding the first on-curve # will be appended at the end of the contour last_offcurves = offcurves else: for (pt, smooth, name, kwargs) in offcurves: pen.addPoint(pt, None, smooth, name, **kwargs) pt, smooth, name, kwargs = points[-1] pen.addPoint(pt, segment_type, smooth, name, **kwargs) else: # 'curve' segments must have been converted to 'qcurve' by now raise AssertionError( "unexpected segment type: %r" % segment_type) for (pt, smooth, name, kwargs) in last_offcurves: pen.addPoint(pt, None, smooth, name, **kwargs) pen.endPath() def addComponent(self, baseGlyphName, transformation): assert self.currentPath is None self.pen.addComponent(baseGlyphName, transformation) cu2qu-1.3.0/Lib/cu2qu/ufo.py000066400000000000000000000207351317615261400154770ustar00rootroot00000000000000# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Converts cubic bezier curves to quadratic splines. Conversion is performed such that the quadratic splines keep the same end-curve tangents as the original cubics. The approach is iterative, increasing the number of segments for a spline until the error gets below a bound. Respective curves from multiple fonts will be converted at once to ensure that the resulting splines are interpolation-compatible. """ from __future__ import print_function, division, absolute_import import logging from fontTools.pens.basePen import AbstractPen from cu2qu import curves_to_quadratic from cu2qu.pens import ReverseContourPen __all__ = ['fonts_to_quadratic', 'font_to_quadratic'] DEFAULT_MAX_ERR = 0.001 logger = logging.getLogger(__name__) class IncompatibleGlyphsError(ValueError): def __str__(self): return ", ".join(set(repr(glyph.name) for glyph in self.args)) class UnequalZipLengthsError(ValueError): pass _zip = zip def zip(*args): """Ensure each argument to zip has the same length. Also make sure a list is returned for python 2/3 compatibility. """ if len(set(len(a) for a in args)) != 1: raise UnequalZipLengthsError(*args) return list(_zip(*args)) class GetSegmentsPen(AbstractPen): """Pen to collect segments into lists of points for conversion. Curves always include their initial on-curve point, so some points are duplicated between segments. """ def __init__(self): self._last_pt = None self.segments = [] def _add_segment(self, tag, *args): if tag in ['move', 'line', 'qcurve', 'curve']: self._last_pt = args[-1] self.segments.append((tag, args)) def moveTo(self, pt): self._add_segment('move', pt) def lineTo(self, pt): self._add_segment('line', pt) def qCurveTo(self, *points): self._add_segment('qcurve', self._last_pt, *points) def curveTo(self, *points): self._add_segment('curve', self._last_pt, *points) def closePath(self): self._add_segment('close') def endPath(self): self._add_segment('end') def addComponent(self, glyphName, transformation): pass def _get_segments(glyph): """Get a glyph's segments as extracted by GetSegmentsPen.""" pen = GetSegmentsPen() glyph.draw(pen) return pen.segments def _set_segments(glyph, segments, reverse_direction): """Draw segments as extracted by GetSegmentsPen back to a glyph.""" glyph.clearContours() pen = glyph.getPen() if reverse_direction: pen = ReverseContourPen(pen) for tag, args in segments: if tag == 'move': pen.moveTo(*args) elif tag == 'line': pen.lineTo(*args) elif tag == 'qcurve': pen.qCurveTo(*args[1:]) elif tag == 'close': pen.closePath() elif tag == 'end': pen.endPath() else: raise AssertionError('Unhandled segment type "%s"' % tag) def _segments_to_quadratic(segments, max_err, stats): """Return quadratic approximations of cubic segments.""" assert all(s[0] == 'curve' for s in segments), 'Non-cubic given to convert' new_points = curves_to_quadratic([s[1] for s in segments], max_err) n = len(new_points[0]) assert all(len(s) == n for s in new_points[1:]), 'Converted incompatibly' spline_length = str(n - 2) stats[spline_length] = stats.get(spline_length, 0) + 1 return [('qcurve', p) for p in new_points] def _glyphs_to_quadratic(glyphs, max_err, reverse_direction, stats): """Do the actual conversion of a set of compatible glyphs, after arguments have been set up. Return True if the glyphs were modified, else return False. """ try: segments_by_location = zip(*[_get_segments(g) for g in glyphs]) except UnequalZipLengthsError: raise IncompatibleGlyphsError(*glyphs) if not any(segments_by_location): return False # always modify input glyphs if reverse_direction is True glyphs_modified = reverse_direction new_segments_by_location = [] for segments in segments_by_location: tag = segments[0][0] if not all(s[0] == tag for s in segments[1:]): raise IncompatibleGlyphsError(*glyphs) if tag == 'curve': segments = _segments_to_quadratic(segments, max_err, stats) glyphs_modified = True new_segments_by_location.append(segments) if glyphs_modified: new_segments_by_glyph = zip(*new_segments_by_location) for glyph, new_segments in zip(glyphs, new_segments_by_glyph): _set_segments(glyph, new_segments, reverse_direction) return glyphs_modified def glyphs_to_quadratic( glyphs, max_err=None, reverse_direction=False, stats=None): """Convert the curves of a set of compatible of glyphs to quadratic. All curves will be converted to quadratic at once, ensuring interpolation compatibility. If this is not required, calling glyphs_to_quadratic with one glyph at a time may yield slightly more optimized results. Return True if glyphs were modified, else return False. Raises IncompatibleGlyphsError if glyphs have non-interpolatable outlines. """ if stats is None: stats = {} if not max_err: # assume 1000 is the default UPEM max_err = DEFAULT_MAX_ERR * 1000 if isinstance(max_err, (list, tuple)): max_errors = max_err else: max_errors = [max_err] * len(glyphs) assert len(max_errors) == len(glyphs) return _glyphs_to_quadratic(glyphs, max_errors, reverse_direction, stats) def fonts_to_quadratic( fonts, max_err_em=None, max_err=None, reverse_direction=False, stats=None, dump_stats=False): """Convert the curves of a collection of fonts to quadratic. All curves will be converted to quadratic at once, ensuring interpolation compatibility. If this is not required, calling fonts_to_quadratic with one font at a time may yield slightly more optimized results. Return True if fonts were modified, else return False. Raises IncompatibleGlyphsError if same-named glyphs from different fonts have non-interpolatable outlines. """ if stats is None: stats = {} if max_err_em and max_err: raise TypeError('Only one of max_err and max_err_em can be specified.') if not (max_err_em or max_err): max_err_em = DEFAULT_MAX_ERR if isinstance(max_err, (list, tuple)): assert len(max_err) == len(fonts) max_errors = max_err elif max_err: max_errors = [max_err] * len(fonts) if isinstance(max_err_em, (list, tuple)): assert len(fonts) == len(max_err_em) max_errors = [f.info.unitsPerEm * e for f, e in zip(fonts, max_err_em)] elif max_err_em: max_errors = [f.info.unitsPerEm * max_err_em for f in fonts] modified = False for name in set().union(*(f.keys() for f in fonts)): glyphs = [] cur_max_errors = [] for font, error in zip(fonts, max_errors): if name in font: glyphs.append(font[name]) cur_max_errors.append(error) modified |= _glyphs_to_quadratic( glyphs, cur_max_errors, reverse_direction, stats) if modified and dump_stats: spline_lengths = sorted(stats.keys()) logger.info('New spline lengths: %s' % (', '.join( '%s: %d' % (l, stats[l]) for l in spline_lengths))) return modified def glyph_to_quadratic(glyph, **kwargs): """Convenience wrapper around glyphs_to_quadratic, for just one glyph. Return True if the glyph was modified, else return False. """ return glyphs_to_quadratic([glyph], **kwargs) def font_to_quadratic(font, **kwargs): """Convenience wrapper around fonts_to_quadratic, for just one font. Return True if the font was modified, else return False. """ return fonts_to_quadratic([font], **kwargs) cu2qu-1.3.0/MANIFEST.in000066400000000000000000000005301317615261400143140ustar00rootroot00000000000000include LICENSE include README.rst include CONTRIBUTING.md include requirements.txt include test-requirements.txt include tox.ini include .coveragerc recursive-include tests *.py recursive-include tests/data *.json recursive-include tests/data */*.glif recursive-include tests/data */*.plist */*/*.glif */*/*.plist recursive-include tools *.py cu2qu-1.3.0/README.rst000066400000000000000000000040361317615261400142520ustar00rootroot00000000000000|Build Status| |PyPI Version| |Coverage| cu2qu ===== This library provides functions which take in UFO objects (Defcon Fonts or Robofab RFonts) and converts any cubic curves to quadratic. The most useful function is probably ``fonts_to_quadratic``: .. code:: python from defcon import Font from cu2qu.ufo import fonts_to_quadratic thin_font = Font('MyFont-Thin.ufo') bold_font = Font('MyFont-Bold.ufo') fonts_to_quadratic([thin_font, bold_font]) Interpolation compatibility is guaranteed during conversion. If it's not needed, converting one font at a time may yield more optimized results: .. code:: python for font in [thin_font, bold_font]: fonts_to_quadratic([font]) Some fonts may need a different error threshold than the default (0.001 em). This can also be provided by the caller: .. code:: python fonts_to_quadratic([thin_font, bold_font], max_err_em=0.005) .. code:: python for font in [thin_font, bold_font]: fonts_to_quadratic([font], max_err_em=0.001) ``fonts_to_quadratic`` can print a string reporting the number of curves of each length. For example ``fonts_to_quadratic([font], dump_stats=True)`` may print something like: :: 3: 1000 4: 2000 5: 100 meaning that the font now contains 1000 curves with three points, 2000 with four points, and 100 with five. Given multiple fonts, the function will report the total counts across all fonts. You can also accumulate statistics between calls by providing your own report dictionary: .. code:: python stats = {} for font in [thin_font, bold_font]: fonts_to_quadratic([font], stats=stats) # "stats" will report combined statistics for both fonts .. |Build Status| image:: https://travis-ci.org/googlei18n/cu2qu.svg :target: https://travis-ci.org/googlei18n/cu2qu .. |PyPI Version| image:: https://img.shields.io/pypi/v/cu2qu.svg :target: https://pypi.org/project/cu2qu/ .. |Coverage| image:: https://codecov.io/gh/googlei18n/cu2qu/branch/master/graph/badge.svg :target: https://codecov.io/gh/googlei18n/cu2qu cu2qu-1.3.0/requirements.txt000066400000000000000000000000401317615261400160360ustar00rootroot00000000000000fonttools==3.18.0 ufoLib==2.1.1 cu2qu-1.3.0/setup.cfg000066400000000000000000000015441317615261400144050ustar00rootroot00000000000000[bumpversion] current_version = 1.3.0 commit = True tag = False tag_name = v{new_version} parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? serialize = {major}.{minor}.{patch}.{release}{dev} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = final values = dev final [bumpversion:part:dev] [bumpversion:file:Lib/cu2qu/__init__.py] search = __version__ = "{current_version}" replace = __version__ = "{new_version}" [bumpversion:file:setup.py] search = version="{current_version}" replace = version="{new_version}" [wheel] universal = 1 [sdist] formats = zip [aliases] test = pytest [metadata] license_file = LICENSE [tool:pytest] minversion = 3.0 testpaths = tests python_files = *_test.py python_classes = *Test addopts = -s -v -r a --doctest-modules --doctest-ignore-import-errors cu2qu-1.3.0/setup.py000066400000000000000000000151771317615261400143050ustar00rootroot00000000000000# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from setuptools import setup, find_packages, Command import sys from distutils import log class bump_version(Command): description = "increment the package version and commit the changes" user_options = [ ("major", None, "bump the first digit, for incompatible API changes"), ("minor", None, "bump the second digit, for new backward-compatible features"), ("patch", None, "bump the third digit, for bug fixes (default)"), ] def initialize_options(self): self.minor = False self.major = False self.patch = False def finalize_options(self): part = None for attr in ("major", "minor", "patch"): if getattr(self, attr, False): if part is None: part = attr else: from distutils.errors import DistutilsOptionError raise DistutilsOptionError( "version part options are mutually exclusive") self.part = part or "patch" def bumpversion(self, part, **kwargs): """ Run bumpversion.main() with the specified arguments. """ import bumpversion args = ['--verbose'] if self.verbose > 1 else [] for k, v in kwargs.items(): k = "--{}".format(k.replace("_", "-")) is_bool = isinstance(v, bool) and v is True args.extend([k] if is_bool else [k, str(v)]) args.append(part) log.debug( "$ bumpversion %s" % " ".join(a.replace(" ", "\\ ") for a in args)) bumpversion.main(args) def run(self): log.info("bumping '%s' version" % self.part) self.bumpversion(self.part) class release(bump_version): """Drop the developmental release '.devN' suffix from the package version, open the default text $EDITOR to write release notes, commit the changes and generate a git tag. Release notes can also be set with the -m/--message option, or by reading from standard input. """ description = "tag a new release" user_options = [ ("message=", 'm', "message containing the release notes"), ] def initialize_options(self): self.message = None def finalize_options(self): import re current_version = self.distribution.metadata.get_version() if not re.search(r"\.dev[0-9]+", current_version): from distutils.errors import DistutilsSetupError raise DistutilsSetupError( "current version (%s) has no '.devN' suffix.\n " "Run 'setup.py bump_version' with any of " "--major, --minor, --patch options" % current_version) message = self.message if message is None: if sys.stdin.isatty(): # stdin is interactive, use editor to write release notes message = self.edit_release_notes() else: # read release notes from stdin pipe message = sys.stdin.read() if not message.strip(): from distutils.errors import DistutilsSetupError raise DistutilsSetupError("release notes message is empty") self.message = "v{new_version}\n\n%s" % message @staticmethod def edit_release_notes(): """Use the default text $EDITOR to write release notes. If $EDITOR is not set, use 'nano'.""" from tempfile import mkstemp import os import shlex import subprocess text_editor = shlex.split(os.environ.get('EDITOR', 'nano')) fd, tmp = mkstemp(prefix='bumpversion-') try: os.close(fd) with open(tmp, 'w') as f: f.write("\n\n# Write release notes.\n" "# Lines starting with '#' will be ignored.") subprocess.check_call(text_editor + [tmp]) with open(tmp, 'r') as f: changes = "".join( l for l in f.readlines() if not l.startswith('#')) finally: os.remove(tmp) return changes def run(self): log.info("stripping developmental release suffix") # drop '.dev0' suffix, commit with given message and create git tag self.bumpversion("release", tag=True, message="Release {new_version}", tag_message=self.message) needs_pytest = {'pytest', 'test'}.intersection(sys.argv) pytest_runner = ['pytest_runner'] if needs_pytest else [] needs_wheel = {'bdist_wheel'}.intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] needs_bump2version = {'release', 'bump_version'}.intersection(sys.argv) bump2version = ['bump2version'] if needs_bump2version else [] with open('README.rst', 'r') as f: long_description = f.read() setup( name='cu2qu', version="1.3.0", description='Cubic-to-quadratic bezier curve conversion', author="James Godfrey-Kittle, Behdad Esfahbod", author_email="jamesgk@google.com", url="https://github.com/googlei18n", license="Apache License, Version 2.0", long_description=long_description, packages=find_packages('Lib'), package_dir={'': 'Lib'}, include_package_data=True, setup_requires=pytest_runner + wheel + bump2version, tests_require=[ 'pytest>=2.8', ], install_requires=[ "fonttools>=3.18.0", "ufoLib>=2.1.1", ], cmdclass={ "release": release, "bump_version": bump_version, }, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Multimedia :: Graphics :: Graphics Conversion', 'Topic :: Multimedia :: Graphics :: Editors :: Vector-Based', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) cu2qu-1.3.0/test-requirements.txt000066400000000000000000000000361317615261400170200ustar00rootroot00000000000000coverage pytest defcon==0.3.5 cu2qu-1.3.0/tests/000077500000000000000000000000001317615261400137225ustar00rootroot00000000000000cu2qu-1.3.0/tests/__init__.py000066400000000000000000000010121317615261400160250ustar00rootroot00000000000000import os from ufoLib.glifLib import GlyphSet import pkg_resources DATADIR = os.path.join(os.path.dirname(__file__), 'data') CUBIC_GLYPHS = GlyphSet(os.path.join(DATADIR, 'cubic')) QUAD_GLYPHS = GlyphSet(os.path.join(DATADIR, 'quadratic')) import unittest # Python 3 renamed 'assertRaisesRegexp' to 'assertRaisesRegex', and fires # deprecation warnings if a program uses the old name. if not hasattr(unittest.TestCase, 'assertRaisesRegex'): unittest.TestCase.assertRaisesRegex = unittest.TestCase.assertRaisesRegexp cu2qu-1.3.0/tests/cu2qu_test.py000066400000000000000000000134151317615261400163760ustar00rootroot00000000000000# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function, division, absolute_import import collections import math import unittest import os import json from cu2qu import curve_to_quadratic, curves_to_quadratic from . import DATADIR MAX_ERR = 5 class CurveToQuadraticTest(unittest.TestCase): @classmethod def setUpClass(cls): """Do the curve conversion ahead of time, and run tests on results.""" with open(os.path.join(DATADIR, "curves.json"), "r") as fp: curves = json.load(fp) cls.single_splines = [ curve_to_quadratic(c, MAX_ERR) for c in curves] cls.single_errors = [ cls.curve_spline_dist(c, s) for c, s in zip(curves, cls.single_splines)] curve_groups = [curves[i:i + 3] for i in range(0, 300, 3)] cls.compat_splines = [ curves_to_quadratic(c, [MAX_ERR] * 3) for c in curve_groups] cls.compat_errors = [ [cls.curve_spline_dist(c, s) for c, s in zip(curve_group, splines)] for curve_group, splines in zip(curve_groups, cls.compat_splines)] cls.results = [] @classmethod def tearDownClass(cls): """Print stats from conversion, as determined during tests.""" for tag, results in cls.results: print('\n%s\n%s' % ( tag, '\n'.join( '%s: %s (%d)' % (k, '#' * (v // 10 + 1), v) for k, v in sorted(results.items())))) def test_results_unchanged(self): """Tests that the results of conversion haven't changed since the time of this test's writing. Useful as a quick check whenever one modifies the conversion algorithm. """ expected = { 2: 6, 3: 26, 4: 82, 5: 232, 6: 360, 7: 266, 8: 28} results = collections.defaultdict(int) for spline in self.single_splines: n = len(spline) - 2 results[n] += 1 self.assertEqual(results, expected) self.results.append(('single spline lengths', results)) def test_results_unchanged_multiple(self): """Test that conversion results are unchanged for multiple curves.""" expected = { 5: 11, 6: 35, 7: 49, 8: 5} results = collections.defaultdict(int) for splines in self.compat_splines: n = len(splines[0]) - 2 for spline in splines[1:]: self.assertEqual(len(spline) - 2, n, 'Got incompatible conversion results') results[n] += 1 self.assertEqual(results, expected) self.results.append(('compatible spline lengths', results)) def test_does_not_exceed_tolerance(self): """Test that conversion results do not exceed given error tolerance.""" results = collections.defaultdict(int) for error in self.single_errors: results[round(error, 1)] += 1 self.assertLessEqual(error, MAX_ERR) self.results.append(('single errors', results)) def test_does_not_exceed_tolerance_multiple(self): """Test that error tolerance isn't exceeded for multiple curves.""" results = collections.defaultdict(int) for errors in self.compat_errors: for error in errors: results[round(error, 1)] += 1 self.assertLessEqual(error, MAX_ERR) self.results.append(('compatible errors', results)) @classmethod def curve_spline_dist(cls, bezier, spline, total_steps=20): """Max distance between a bezier and quadratic spline at sampled points.""" error = 0 n = len(spline) - 2 steps = total_steps // n for i in range(0, n - 1): p1 = spline[0] if i == 0 else p3 p2 = spline[i + 1] if i < n - 1: p3 = cls.lerp(spline[i + 1], spline[i + 2], 0.5) else: p3 = spline[n + 2] segment = p1, p2, p3 for j in range(steps): error = max(error, cls.dist( cls.cubic_bezier_at(bezier, (j / steps + i) / n), cls.quadratic_bezier_at(segment, j / steps))) return error @classmethod def lerp(cls, p1, p2, t): (x1, y1), (x2, y2) = p1, p2 return x1 + (x2 - x1) * t, y1 + (y2 - y1) * t @classmethod def dist(cls, p1, p2): (x1, y1), (x2, y2) = p1, p2 return math.hypot(x1 - x2, y1 - y2) @classmethod def quadratic_bezier_at(cls, b, t): (x1, y1), (x2, y2), (x3, y3) = b _t = 1 - t t2 = t * t _t2 = _t * _t _2_t_t = 2 * t * _t return (_t2 * x1 + _2_t_t * x2 + t2 * x3, _t2 * y1 + _2_t_t * y2 + t2 * y3) @classmethod def cubic_bezier_at(cls, b, t): (x1, y1), (x2, y2), (x3, y3), (x4, y4) = b _t = 1 - t t2 = t * t _t2 = _t * _t t3 = t * t2 _t3 = _t * _t2 _3_t2_t = 3 * t2 * _t _3_t_t2 = 3 * t * _t2 return (_t3 * x1 + _3_t_t2 * x2 + _3_t2_t * x3 + t3 * x4, _t3 * y1 + _3_t_t2 * y2 + _3_t2_t * y3 + t3 * y4) if __name__ == '__main__': unittest.main() cu2qu-1.3.0/tests/data/000077500000000000000000000000001317615261400146335ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/000077500000000000000000000000001317615261400207335ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/fontinfo.plist000066400000000000000000000120611317615261400236320ustar00rootroot00000000000000 ascender 2146 capHeight 1456 copyright Copyright 2011 Google Inc. All Rights Reserved. descender -555 familyName RobotoSubset italicAngle 0 openTypeHeadCreated 2008/09/12 12:29:34 openTypeHeadFlags 0 1 3 4 openTypeHeadLowestRecPPEM 9 openTypeHheaAscender 1900 openTypeHheaDescender -500 openTypeHheaLineGap 0 openTypeNameDescription openTypeNameDesigner openTypeNameDesignerURL openTypeNameLicense openTypeNameLicenseURL openTypeNameManufacturer openTypeNameManufacturerURL openTypeNameSampleText openTypeOS2CodePageRanges 0 1 2 3 4 7 8 29 openTypeOS2FamilyClass 0 0 openTypeOS2Panose 0 0 0 0 0 0 0 0 0 0 openTypeOS2Selection openTypeOS2StrikeoutPosition 512 openTypeOS2StrikeoutSize 102 openTypeOS2SubscriptXOffset 0 openTypeOS2SubscriptXSize 1434 openTypeOS2SubscriptYOffset 287 openTypeOS2SubscriptYSize 1331 openTypeOS2SuperscriptXOffset 0 openTypeOS2SuperscriptXSize 1434 openTypeOS2SuperscriptYOffset 977 openTypeOS2SuperscriptYSize 1331 openTypeOS2Type openTypeOS2TypoAscender 2146 openTypeOS2TypoDescender -555 openTypeOS2TypoLineGap 0 openTypeOS2UnicodeRanges 0 1 2 3 4 5 6 7 9 11 29 30 31 32 33 34 35 36 37 38 40 45 60 62 64 69 openTypeOS2VendorID GOOG openTypeOS2WeightClass 700 openTypeOS2WidthClass 5 openTypeOS2WinAscent 2146 openTypeOS2WinDescent 555 postscriptBlueFuzz 1 postscriptBlueScale 0.039625 postscriptBlueShift 7 postscriptBlueValues -20 0 1082 1102 1456 1476 postscriptDefaultCharacter space postscriptForceBold postscriptIsFixedPitch postscriptOtherBlues -436 -416 postscriptStemSnapH 250 postscriptStemSnapV 316 postscriptUnderlinePosition -150 postscriptUnderlineThickness 100 postscriptUniqueID -1 styleName Bold trademark unitsPerEm 2048 versionMajor 1 versionMinor 0 xHeight 1082 year 2017 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/000077500000000000000000000000001317615261400222415ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/A_.glif000066400000000000000000000014161317615261400234250ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/B_.glif000066400000000000000000000032121317615261400234220ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/C_.glif000066400000000000000000000022561317615261400234320ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/D_.glif000066400000000000000000000020721317615261400234270ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/E_.glif000066400000000000000000000015731317615261400234350ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/F_.glif000066400000000000000000000013041317615261400234260ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/G_.glif000066400000000000000000000025501317615261400234330ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/H_.glif000066400000000000000000000012761317615261400234400ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/I_.glif000066400000000000000000000005111317615261400234300ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/J_.glif000066400000000000000000000013551317615261400234400ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/K_.glif000066400000000000000000000014141317615261400234350ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/L_.glif000066400000000000000000000010011317615261400234260ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/M_.glif000066400000000000000000000016121317615261400234370ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/N_.glif000066400000000000000000000010721317615261400234400ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/O_.glif000066400000000000000000000023071317615261400234430ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/P_.glif000066400000000000000000000015711317615261400234460ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/Q_.glif000066400000000000000000000026021317615261400234430ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/R_.glif000066400000000000000000000023151317615261400234450ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/S_.glif000066400000000000000000000027471317615261400234570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/T_.glif000066400000000000000000000010071317615261400234440ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/U_.glif000066400000000000000000000015341317615261400234520ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/V_.glif000066400000000000000000000011201317615261400234420ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/W_.glif000066400000000000000000000021511317615261400234500ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/X_.glif000066400000000000000000000012101317615261400234440ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/Y_.glif000066400000000000000000000010241317615261400234500ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/Z_.glif000066400000000000000000000014171317615261400234570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/a.glif000066400000000000000000000034321317615261400233260ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/b.glif000066400000000000000000000026731317615261400233350ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/c.glif000066400000000000000000000022451317615261400233310ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/contents.plist000066400000000000000000000045351317615261400251620ustar00rootroot00000000000000 A A_.glif B B_.glif C C_.glif D D_.glif E E_.glif F F_.glif G G_.glif H H_.glif I I_.glif J J_.glif K K_.glif L L_.glif M M_.glif N N_.glif O O_.glif P P_.glif Q Q_.glif R R_.glif S S_.glif T T_.glif U U_.glif V V_.glif W W_.glif X X_.glif Y Y_.glif Z Z_.glif a a.glif b b.glif c c.glif d d.glif e e.glif f f.glif g g.glif h h.glif i i.glif j j.glif k k.glif l l.glif m m.glif n n.glif o o.glif p p.glif q q.glif r r.glif s s.glif space space.glif t t.glif u u.glif v v.glif w w.glif x x.glif y y.glif z z.glif cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/d.glif000066400000000000000000000026651317615261400233400ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/e.glif000066400000000000000000000026201317615261400233300ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/f.glif000066400000000000000000000016701317615261400233350ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/g.glif000066400000000000000000000035721317615261400233410ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/h.glif000066400000000000000000000016731317615261400233420ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/i.glif000066400000000000000000000014431317615261400233360ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/j.glif000066400000000000000000000023211317615261400233330ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/k.glif000066400000000000000000000014141317615261400233360ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/l.glif000066400000000000000000000005111317615261400233340ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/m.glif000066400000000000000000000031111317615261400233340ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/n.glif000066400000000000000000000017111317615261400233410ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/o.glif000066400000000000000000000022441317615261400233440ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/p.glif000066400000000000000000000027011317615261400233430ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/q.glif000066400000000000000000000026731317615261400233540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/r.glif000066400000000000000000000015431317615261400233500ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/s.glif000066400000000000000000000027411317615261400233520ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/space.glif000066400000000000000000000013451317615261400242020ustar00rootroot00000000000000 com.typemytype.robofont.guides angle 0 isGlobal magnetic 5 x 0 y 901 angle 0 isGlobal magnetic 5 x 0 y 555 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/t.glif000066400000000000000000000016411317615261400233510ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/u.glif000066400000000000000000000017111317615261400233500ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/v.glif000066400000000000000000000011201317615261400233430ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/w.glif000066400000000000000000000021451317615261400233540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/x.glif000066400000000000000000000012101317615261400233450ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/y.glif000066400000000000000000000020211317615261400233470ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/glyphs/z.glif000066400000000000000000000014061317615261400233560ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/layercontents.plist000066400000000000000000000004231317615261400247010ustar00rootroot00000000000000 public.default glyphs cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/lib.plist000066400000000000000000000026041317615261400225600ustar00rootroot00000000000000 public.glyphOrder space A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z cu2qu-1.3.0/tests/data/RobotoSubset-Bold.ufo/metainfo.plist000066400000000000000000000004531317615261400236140ustar00rootroot00000000000000 creator org.robofab.ufoLib formatVersion 3 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/000077500000000000000000000000001317615261400214545ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/fontinfo.plist000066400000000000000000000126261317615261400243620ustar00rootroot00000000000000 ascender 2146 capHeight 1456 copyright Copyright 2011 Google Inc. All Rights Reserved. descender -555 familyName RobotoSubset guidelines italicAngle 0 openTypeHeadCreated 2008/09/12 12:29:34 openTypeHeadFlags 0 1 3 4 openTypeHeadLowestRecPPEM 9 openTypeHheaAscender 1900 openTypeHheaDescender -500 openTypeHheaLineGap 0 openTypeNameDescription openTypeNameDesigner openTypeNameDesignerURL openTypeNameLicense openTypeNameLicenseURL openTypeNameManufacturer openTypeNameManufacturerURL openTypeNameSampleText openTypeOS2CodePageRanges 0 1 2 3 4 7 8 29 openTypeOS2FamilyClass 0 0 openTypeOS2Panose 2 0 0 0 0 0 0 0 0 0 openTypeOS2Selection openTypeOS2StrikeoutPosition 512 openTypeOS2StrikeoutSize 102 openTypeOS2SubscriptXOffset 0 openTypeOS2SubscriptXSize 1434 openTypeOS2SubscriptYOffset 287 openTypeOS2SubscriptYSize 1331 openTypeOS2SuperscriptXOffset 0 openTypeOS2SuperscriptXSize 1434 openTypeOS2SuperscriptYOffset 977 openTypeOS2SuperscriptYSize 1331 openTypeOS2Type openTypeOS2TypoAscender 2146 openTypeOS2TypoDescender -555 openTypeOS2TypoLineGap 0 openTypeOS2UnicodeRanges 0 1 2 3 4 5 6 7 9 11 29 30 31 32 33 34 35 36 37 38 40 45 60 62 64 69 openTypeOS2VendorID GOOG openTypeOS2WeightClass 400 openTypeOS2WidthClass 5 openTypeOS2WinAscent 2146 openTypeOS2WinDescent 555 postscriptBlueFuzz 1 postscriptBlueScale 0.039625 postscriptBlueShift 7 postscriptBlueValues -20 0 1082 1102 1456 1476 postscriptDefaultCharacter space postscriptFamilyBlues postscriptFamilyOtherBlues postscriptForceBold postscriptIsFixedPitch postscriptOtherBlues -436 -416 postscriptStemSnapH 154 postscriptStemSnapV 196 postscriptUnderlinePosition -150 postscriptUnderlineThickness 100 postscriptUniqueID -1 styleName Regular trademark unitsPerEm 2048 versionMajor 1 versionMinor 0 xHeight 1082 year 2017 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/000077500000000000000000000000001317615261400227625ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/A_.glif000066400000000000000000000014171317615261400241470ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/B_.glif000066400000000000000000000032101317615261400241410ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/C_.glif000066400000000000000000000022661317615261400241540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/D_.glif000066400000000000000000000020761317615261400241540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/E_.glif000066400000000000000000000015711317615261400241540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/F_.glif000066400000000000000000000013021317615261400241450ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/G_.glif000066400000000000000000000025641317615261400241610ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/H_.glif000066400000000000000000000013001317615261400241450ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/I_.glif000066400000000000000000000005111317615261400241510ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/J_.glif000066400000000000000000000013521317615261400241560ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/K_.glif000066400000000000000000000014151317615261400241570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/L_.glif000066400000000000000000000010011317615261400241470ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/M_.glif000066400000000000000000000016111317615261400241570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/N_.glif000066400000000000000000000010761317615261400241650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/O_.glif000066400000000000000000000023171317615261400241650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/P_.glif000066400000000000000000000015761317615261400241740ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/Q_.glif000066400000000000000000000026131317615261400241660ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/R_.glif000066400000000000000000000023021317615261400241620ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/S_.glif000066400000000000000000000027321317615261400241720ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/T_.glif000066400000000000000000000010071317615261400241650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/U_.glif000066400000000000000000000015331317615261400241720ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/V_.glif000066400000000000000000000011221317615261400241650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/W_.glif000066400000000000000000000021511317615261400241710ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/X_.glif000066400000000000000000000012101317615261400241650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/Y_.glif000066400000000000000000000010241317615261400241710ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/Z_.glif000066400000000000000000000014171317615261400242000ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/a.glif000066400000000000000000000034221317615261400240460ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/b.glif000066400000000000000000000026411317615261400240510ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/c.glif000066400000000000000000000022451317615261400240520ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/contents.plist000066400000000000000000000045351317615261400257030ustar00rootroot00000000000000 A A_.glif B B_.glif C C_.glif D D_.glif E E_.glif F F_.glif G G_.glif H H_.glif I I_.glif J J_.glif K K_.glif L L_.glif M M_.glif N N_.glif O O_.glif P P_.glif Q Q_.glif R R_.glif S S_.glif T T_.glif U U_.glif V V_.glif W W_.glif X X_.glif Y Y_.glif Z Z_.glif a a.glif b b.glif c c.glif d d.glif e e.glif f f.glif g g.glif h h.glif i i.glif j j.glif k k.glif l l.glif m m.glif n n.glif o o.glif p p.glif q q.glif r r.glif s s.glif space space.glif t t.glif u u.glif v v.glif w w.glif x x.glif y y.glif z z.glif cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/d.glif000066400000000000000000000026331317615261400240540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/e.glif000066400000000000000000000025211317615261400240510ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/f.glif000066400000000000000000000016541317615261400240600ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/g.glif000066400000000000000000000035421317615261400240570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/h.glif000066400000000000000000000016721317615261400240620ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/i.glif000066400000000000000000000013771317615261400240650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/j.glif000066400000000000000000000023211317615261400240540ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/k.glif000066400000000000000000000014131317615261400240560ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/l.glif000066400000000000000000000005111317615261400240550ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/m.glif000066400000000000000000000031041317615261400240570ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/n.glif000066400000000000000000000017421317615261400240660ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/o.glif000066400000000000000000000022441317615261400240650ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/p.glif000066400000000000000000000026471317615261400240750ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/q.glif000066400000000000000000000026411317615261400240700ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/r.glif000066400000000000000000000015431317615261400240710ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/s.glif000066400000000000000000000027441317615261400240760ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/space.glif000066400000000000000000000001771317615261400247250ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/t.glif000066400000000000000000000016361317615261400240760ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/u.glif000066400000000000000000000017121317615261400240720ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/v.glif000066400000000000000000000011171317615261400240720ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/w.glif000066400000000000000000000021461317615261400240760ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/x.glif000066400000000000000000000012061317615261400240730ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/y.glif000066400000000000000000000020301317615261400240700ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/glyphs/z.glif000066400000000000000000000014061317615261400240770ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/layercontents.plist000066400000000000000000000004231317615261400254220ustar00rootroot00000000000000 public.default glyphs cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/lib.plist000066400000000000000000000026041317615261400233010ustar00rootroot00000000000000 public.glyphOrder space A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z cu2qu-1.3.0/tests/data/RobotoSubset-Regular.ufo/metainfo.plist000066400000000000000000000004531317615261400243350ustar00rootroot00000000000000 creator org.robofab.ufoLib formatVersion 3 cu2qu-1.3.0/tests/data/cubic/000077500000000000000000000000001317615261400157205ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/cubic/A_.glif000077500000000000000000000034411317615261400171070ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/cubic/A_acute.glif000077500000000000000000000003461317615261400201320ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/cubic/E_acute.glif000077500000000000000000000034731317615261400201420ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/cubic/a.glif000066400000000000000000000046261317615261400170130ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/cubic/acute.glif000077500000000000000000000005161317615261400176710ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/cubic/contents.plist000066400000000000000000000006471317615261400206410ustar00rootroot00000000000000 A A_.glif Aacute A_acute.glif Eacute E_acute.glif a a.glif acute acute.glif cu2qu-1.3.0/tests/data/curves.json000066400000000000000000001703631317615261400170470ustar00rootroot00000000000000[[[550.0,258.0],[1044.0,482.0],[2029.0,1841.0],[1934.0,1554.0]],[[859.0,384.0],[1998.0,116.0],[1596.0,1772.0],[8.0,1824.0]],[[1090.0,937.0],[418.0,1300.0],[125.0,91.0],[104.0,37.0]],[[1561.0,887.0],[1728.0,118.0],[908.0,1793.0],[2030.0,954.0]],[[1415.0,945.0],[896.0,1882.0],[1186.0,88.0],[1704.0,409.0]],[[761.0,1214.0],[495.0,1362.0],[1728.0,777.0],[1242.0,1163.0]],[[2045.0,1611.0],[141.0,1967.0],[994.0,1655.0],[1697.0,708.0]],[[1503.0,1534.0],[354.0,1797.0],[442.0,670.0],[1610.0,1517.0]],[[2005.0,121.0],[1922.0,178.0],[1263.0,1612.0],[697.0,690.0]],[[929.0,50.0],[817.0,950.0],[1656.0,1408.0],[1447.0,1880.0]],[[1102.0,23.0],[1571.0,529.0],[841.0,1745.0],[229.0,1970.0]],[[1493.0,818.0],[1693.0,1986.0],[1461.0,1697.0],[1417.0,6.0]],[[1356.0,1876.0],[114.0,940.0],[725.0,740.0],[375.0,1045.0]],[[132.0,288.0],[340.0,68.0],[1855.0,59.0],[1151.0,1022.0]],[[1100.0,448.0],[756.0,1410.0],[1189.0,284.0],[685.0,653.0]],[[1045.0,688.0],[1117.0,1206.0],[1862.0,1318.0],[2033.0,1940.0]],[[467.0,96.0],[1277.0,1583.0],[1406.0,1724.0],[770.0,1058.0]],[[445.0,1038.0],[856.0,1768.0],[85.0,923.0],[73.0,1627.0]],[[599.0,144.0],[656.0,1825.0],[1747.0,903.0],[1846.0,914.0]],[[125.0,1617.0],[1315.0,1746.0],[240.0,1223.0],[514.0,868.0]],[[194.0,1254.0],[289.0,313.0],[1271.0,1220.0],[648.0,1704.0]],[[1033.0,534.0],[34.0,155.0],[891.0,1887.0],[702.0,153.0]],[[1548.0,820.0],[1421.0,405.0],[842.0,1773.0],[795.0,2016.0]],[[427.0,1597.0],[1212.0,2047.0],[70.0,1332.0],[1647.0,1152.0]],[[74.0,642.0],[822.0,1342.0],[553.0,1388.0],[1758.0,872.0]],[[1091.0,394.0],[1553.0,1408.0],[1984.0,961.0],[267.0,165.0]],[[346.0,544.0],[695.0,682.0],[872.0,1097.0],[1360.0,1045.0]],[[1507.0,1387.0],[1393.0,466.0],[1192.0,963.0],[2002.0,554.0]],[[427.0,1313.0],[160.0,1665.0],[299.0,1557.0],[603.0,512.0]],[[1396.0,469.0],[1548.0,313.0],[916.0,334.0],[1092.0,1494.0]],[[1210.0,468.0],[1875.0,1135.0],[441.0,187.0],[1211.0,50.0]],[[59.0,375.0],[1693.0,471.0],[163.0,769.0],[981.0,1724.0]],[[663.0,473.0],[1846.0,685.0],[988.0,651.0],[421.0,1782.0]],[[1549.0,1204.0],[1037.0,1953.0],[1288.0,410.0],[850.0,1300.0]],[[162.0,111.0],[43.0,1210.0],[1311.0,1842.0],[1602.0,1283.0]],[[1632.0,257.0],[262.0,1299.0],[1867.0,456.0],[1024.0,881.0]],[[1920.0,1457.0],[1061.0,750.0],[851.0,1258.0],[815.0,1009.0]],[[1476.0,333.0],[1150.0,366.0],[1834.0,370.0],[1388.0,931.0]],[[1599.0,1256.0],[168.0,1340.0],[765.0,1297.0],[1240.0,1006.0]],[[1369.0,413.0],[377.0,1003.0],[901.0,83.0],[998.0,1645.0]],[[296.0,1097.0],[290.0,307.0],[88.0,40.0],[1191.0,1471.0]],[[2020.0,1920.0],[631.0,413.0],[1343.0,315.0],[709.0,735.0]],[[612.0,579.0],[1309.0,1251.0],[437.0,1202.0],[517.0,846.0]],[[580.0,130.0],[1294.0,841.0],[729.0,1224.0],[1772.0,646.0]],[[198.0,1012.0],[1034.0,263.0],[1829.0,1761.0],[1024.0,1799.0]],[[1856.0,44.0],[1620.0,1387.0],[702.0,1056.0],[1989.0,99.0]],[[1706.0,77.0],[255.0,1453.0],[566.0,512.0],[567.0,1061.0]],[[1134.0,1629.0],[1642.0,705.0],[365.0,956.0],[1990.0,30.0]],[[727.0,1299.0],[1795.0,924.0],[976.0,1281.0],[2027.0,1961.0]],[[921.0,1688.0],[1380.0,1127.0],[898.0,197.0],[293.0,1510.0]],[[653.0,834.0],[1277.0,1223.0],[1227.0,1522.0],[676.0,1903.0]],[[348.0,504.0],[1545.0,722.0],[638.0,1026.0],[1747.0,891.0]],[[213.0,2027.0],[1612.0,1425.0],[1572.0,675.0],[166.0,370.0]],[[1045.0,413.0],[1095.0,342.0],[569.0,335.0],[1822.0,987.0]],[[1566.0,1773.0],[1627.0,674.0],[1333.0,1794.0],[517.0,1998.0]],[[868.0,488.0],[1766.0,1672.0],[483.0,1210.0],[1137.0,1016.0]],[[1551.0,16.0],[777.0,1797.0],[86.0,126.0],[992.0,1066.0]],[[846.0,708.0],[1166.0,607.0],[821.0,1119.0],[1274.0,1027.0]],[[1828.0,688.0],[1462.0,2010.0],[1720.0,498.0],[855.0,1569.0]],[[838.0,1163.0],[442.0,98.0],[483.0,54.0],[1214.0,559.0]],[[307.0,1530.0],[1274.0,1790.0],[1461.0,1325.0],[3.0,507.0]],[[1811.0,1841.0],[1434.0,1248.0],[1635.0,1390.0],[2016.0,463.0]],[[1546.0,1566.0],[835.0,15.0],[1137.0,814.0],[1890.0,1675.0]],[[1250.0,697.0],[1840.0,808.0],[1472.0,14.0],[1594.0,1744.0]],[[1659.0,1376.0],[277.0,2018.0],[1014.0,1191.0],[85.0,1667.0]],[[639.0,1627.0],[1106.0,729.0],[300.0,41.0],[1431.0,1083.0]],[[1684.0,1243.0],[622.0,1892.0],[1062.0,1984.0],[694.0,1913.0]],[[185.0,1109.0],[403.0,1730.0],[285.0,1454.0],[274.0,1812.0]],[[80.0,672.0],[662.0,381.0],[1646.0,1129.0],[1246.0,855.0]],[[850.0,971.0],[1367.0,1102.0],[280.0,306.0],[1508.0,1916.0]],[[203.0,690.0],[1216.0,1104.0],[1457.0,950.0],[1607.0,1637.0]],[[705.0,1980.0],[1063.0,1350.0],[910.0,1059.0],[1000.0,125.0]],[[1649.0,1296.0],[1768.0,1017.0],[1102.0,777.0],[297.0,678.0]],[[1816.0,606.0],[1073.0,1881.0],[665.0,567.0],[565.0,1805.0]],[[1479.0,1268.0],[1641.0,985.0],[474.0,844.0],[1251.0,279.0]],[[435.0,932.0],[1626.0,1316.0],[2016.0,409.0],[764.0,184.0]],[[226.0,95.0],[887.0,142.0],[2025.0,1811.0],[1402.0,1124.0]],[[483.0,707.0],[390.0,909.0],[1637.0,955.0],[2027.0,1842.0]],[[1547.0,690.0],[949.0,965.0],[1161.0,1894.0],[1595.0,867.0]],[[1850.0,1056.0],[1352.0,2032.0],[454.0,875.0],[322.0,189.0]],[[63.0,21.0],[1967.0,1308.0],[1569.0,1176.0],[802.0,1638.0]],[[655.0,623.0],[124.0,62.0],[1586.0,594.0],[233.0,1554.0]],[[1041.0,532.0],[325.0,1895.0],[1242.0,59.0],[145.0,249.0]],[[528.0,175.0],[1120.0,481.0],[1771.0,372.0],[778.0,113.0]],[[2046.0,533.0],[1143.0,786.0],[1833.0,1596.0],[1350.0,1097.0]],[[1064.0,995.0],[1005.0,246.0],[717.0,1432.0],[1755.0,249.0]],[[1446.0,1690.0],[816.0,1737.0],[287.0,1094.0],[296.0,1030.0]],[[727.0,395.0],[618.0,240.0],[832.0,1753.0],[183.0,216.0]],[[373.0,1921.0],[1516.0,406.0],[1280.0,164.0],[518.0,135.0]],[[1815.0,525.0],[1618.0,1827.0],[100.0,1105.0],[370.0,1024.0]],[[1332.0,351.0],[1236.0,140.0],[1573.0,238.0],[1069.0,1282.0]],[[532.0,1066.0],[1557.0,479.0],[1244.0,385.0],[1740.0,1005.0]],[[841.0,1352.0],[1387.0,1601.0],[1970.0,428.0],[531.0,1837.0]],[[123.0,1193.0],[643.0,819.0],[1516.0,1594.0],[1328.0,398.0]],[[1677.0,1414.0],[517.0,265.0],[178.0,1230.0],[1284.0,1710.0]],[[1221.0,1305.0],[1444.0,1116.0],[1332.0,35.0],[499.0,609.0]],[[1298.0,1333.0],[1341.0,281.0],[1850.0,1145.0],[1964.0,1860.0]],[[1491.0,1558.0],[320.0,229.0],[551.0,199.0],[2015.0,1031.0]],[[1005.0,1387.0],[1481.0,1516.0],[1648.0,1259.0],[1902.0,1394.0]],[[687.0,119.0],[607.0,1024.0],[905.0,546.0],[461.0,756.0]],[[1683.0,205.0],[406.0,1088.0],[438.0,836.0],[1071.0,273.0]],[[321.0,298.0],[890.0,710.0],[1769.0,89.0],[1507.0,1993.0]],[[1162.0,900.0],[820.0,2021.0],[963.0,1742.0],[1852.0,1503.0]],[[773.0,1974.0],[297.0,1050.0],[1668.0,824.0],[33.0,1559.0]],[[1995.0,312.0],[1653.0,1743.0],[164.0,1441.0],[1877.0,26.0]],[[777.0,1226.0],[22.0,491.0],[1239.0,1292.0],[1157.0,1685.0]],[[1672.0,1260.0],[1853.0,1236.0],[536.0,1819.0],[574.0,667.0]],[[1035.0,39.0],[1737.0,148.0],[1508.0,1723.0],[1647.0,1153.0]],[[75.0,370.0],[368.0,19.0],[1570.0,1101.0],[1902.0,1113.0]],[[1526.0,1971.0],[1378.0,1591.0],[1868.0,477.0],[1981.0,1452.0]],[[592.0,1700.0],[607.0,74.0],[704.0,1065.0],[1506.0,520.0]],[[1176.0,1691.0],[1056.0,1176.0],[1723.0,1120.0],[1775.0,1375.0]],[[1989.0,882.0],[2012.0,1646.0],[1741.0,374.0],[263.0,530.0]],[[844.0,612.0],[938.0,107.0],[422.0,1037.0],[637.0,1965.0]],[[405.0,1634.0],[767.0,12.0],[365.0,1751.0],[208.0,894.0]],[[1728.0,1420.0],[192.0,422.0],[1718.0,485.0],[1086.0,1141.0]],[[733.0,1964.0],[195.0,877.0],[357.0,1596.0],[507.0,1832.0]],[[1205.0,2039.0],[1610.0,475.0],[1962.0,433.0],[610.0,1582.0]],[[824.0,684.0],[1055.0,1706.0],[1182.0,2017.0],[879.0,1380.0]],[[1990.0,421.0],[35.0,1420.0],[1095.0,231.0],[1803.0,1228.0]],[[412.0,936.0],[1124.0,1107.0],[1009.0,1686.0],[607.0,533.0]],[[1049.0,799.0],[1670.0,239.0],[609.0,1694.0],[1106.0,1146.0]],[[1966.0,1252.0],[1093.0,2012.0],[878.0,2042.0],[1506.0,1927.0]],[[989.0,1386.0],[721.0,742.0],[1847.0,612.0],[238.0,1335.0]],[[553.0,873.0],[1291.0,2022.0],[1967.0,1351.0],[484.0,523.0]],[[573.0,1050.0],[921.0,360.0],[204.0,704.0],[475.0,926.0]],[[816.0,1261.0],[1729.0,1342.0],[17.0,82.0],[1250.0,902.0]],[[346.0,919.0],[1147.0,1397.0],[1102.0,1553.0],[94.0,498.0]],[[1351.0,1421.0],[571.0,464.0],[1027.0,586.0],[168.0,1421.0]],[[316.0,376.0],[422.0,1228.0],[1298.0,1019.0],[1103.0,203.0]],[[1481.0,127.0],[320.0,569.0],[1635.0,1523.0],[991.0,384.0]],[[1346.0,1120.0],[32.0,1318.0],[459.0,1443.0],[515.0,1110.0]],[[1659.0,373.0],[1947.0,1715.0],[1612.0,1233.0],[898.0,1239.0]],[[545.0,220.0],[450.0,717.0],[985.0,880.0],[1780.0,1124.0]],[[81.0,1025.0],[1109.0,1072.0],[1938.0,516.0],[1651.0,424.0]],[[1529.0,282.0],[1487.0,124.0],[1262.0,1824.0],[541.0,638.0]],[[304.0,581.0],[885.0,1982.0],[1374.0,1495.0],[1197.0,654.0]],[[637.0,1563.0],[1801.0,1661.0],[482.0,594.0],[1104.0,1209.0]],[[33.0,39.0],[543.0,1554.0],[414.0,1882.0],[124.0,1769.0]],[[1729.0,1130.0],[1516.0,1672.0],[1663.0,1892.0],[218.0,406.0]],[[1928.0,153.0],[2.0,172.0],[455.0,571.0],[1459.0,1109.0]],[[1459.0,1941.0],[1004.0,982.0],[432.0,1465.0],[649.0,476.0]],[[166.0,1284.0],[1730.0,1418.0],[1038.0,228.0],[1781.0,1699.0]],[[1541.0,1469.0],[1203.0,1397.0],[1806.0,975.0],[591.0,229.0]],[[1398.0,464.0],[705.0,1996.0],[1396.0,497.0],[88.0,1967.0]],[[856.0,1569.0],[715.0,1627.0],[933.0,408.0],[1017.0,1374.0]],[[1347.0,1004.0],[1889.0,1929.0],[1513.0,2017.0],[793.0,1769.0]],[[1804.0,1633.0],[493.0,1999.0],[1091.0,512.0],[613.0,48.0]],[[1540.0,1698.0],[446.0,107.0],[305.0,749.0],[1879.0,1544.0]],[[1181.0,636.0],[631.0,433.0],[1042.0,76.0],[1902.0,1624.0]],[[935.0,1600.0],[21.0,1021.0],[1732.0,650.0],[733.0,1402.0]],[[979.0,311.0],[659.0,719.0],[1538.0,88.0],[888.0,1750.0]],[[965.0,165.0],[779.0,316.0],[1015.0,1630.0],[1904.0,487.0]],[[198.0,1585.0],[367.0,387.0],[1961.0,184.0],[979.0,49.0]],[[85.0,1277.0],[1910.0,1138.0],[1702.0,682.0],[545.0,1303.0]],[[1837.0,1710.0],[686.0,1619.0],[1593.0,822.0],[2029.0,1140.0]],[[1474.0,620.0],[1062.0,1144.0],[717.0,342.0],[1476.0,1376.0]],[[584.0,1058.0],[1044.0,1033.0],[1430.0,1573.0],[1143.0,1915.0]],[[55.0,610.0],[533.0,1035.0],[925.0,804.0],[288.0,812.0]],[[1758.0,982.0],[570.0,1886.0],[1602.0,802.0],[338.0,316.0]],[[627.0,235.0],[123.0,1660.0],[1567.0,1709.0],[563.0,529.0]],[[303.0,988.0],[1563.0,571.0],[1170.0,829.0],[1626.0,1461.0]],[[730.0,922.0],[1219.0,589.0],[1424.0,2015.0],[1195.0,362.0]],[[1224.0,855.0],[1898.0,89.0],[1189.0,422.0],[1526.0,1816.0]],[[1044.0,238.0],[213.0,1292.0],[654.0,542.0],[423.0,460.0]],[[1782.0,1007.0],[851.0,1625.0],[497.0,869.0],[1572.0,548.0]],[[1042.0,14.0],[495.0,825.0],[1548.0,1974.0],[944.0,1096.0]],[[154.0,687.0],[954.0,1681.0],[1121.0,1725.0],[1632.0,1114.0]],[[2023.0,400.0],[530.0,764.0],[65.0,1859.0],[183.0,2000.0]],[[877.0,1613.0],[1377.0,997.0],[385.0,315.0],[174.0,1731.0]],[[1809.0,773.0],[709.0,778.0],[1576.0,1476.0],[807.0,953.0]],[[1473.0,264.0],[1396.0,212.0],[1877.0,181.0],[724.0,604.0]],[[1169.0,1921.0],[176.0,265.0],[1623.0,376.0],[1638.0,1234.0]],[[1615.0,1097.0],[1442.0,1927.0],[201.0,1954.0],[71.0,1748.0]],[[1247.0,1299.0],[611.0,1137.0],[269.0,1478.0],[1700.0,1601.0]],[[96.0,464.0],[151.0,58.0],[413.0,1360.0],[1379.0,1508.0]],[[141.0,1516.0],[303.0,1986.0],[343.0,1827.0],[1370.0,2048.0]],[[13.0,658.0],[1331.0,1478.0],[876.0,598.0],[607.0,441.0]],[[1654.0,1299.0],[1723.0,1474.0],[1398.0,1064.0],[1509.0,154.0]],[[259.0,1010.0],[1087.0,1626.0],[1162.0,341.0],[306.0,697.0]],[[1094.0,1694.0],[341.0,517.0],[1156.0,1076.0],[961.0,862.0]],[[404.0,1135.0],[1967.0,192.0],[1234.0,835.0],[307.0,1292.0]],[[1391.0,1212.0],[545.0,144.0],[1811.0,1490.0],[152.0,117.0]],[[1292.0,1710.0],[670.0,166.0],[1739.0,755.0],[808.0,953.0]],[[470.0,532.0],[501.0,1091.0],[1877.0,804.0],[226.0,1479.0]],[[1868.0,1371.0],[1452.0,900.0],[38.0,57.0],[2001.0,132.0]],[[673.0,1037.0],[163.0,37.0],[942.0,346.0],[709.0,143.0]],[[820.0,857.0],[1814.0,1182.0],[995.0,2009.0],[1521.0,1330.0]],[[1605.0,300.0],[799.0,743.0],[768.0,1216.0],[1745.0,1941.0]],[[1488.0,94.0],[1996.0,84.0],[429.0,1771.0],[1407.0,1388.0]],[[303.0,1721.0],[799.0,2024.0],[1956.0,1843.0],[1929.0,677.0]],[[1098.0,1235.0],[1623.0,1061.0],[1046.0,1270.0],[60.0,187.0]],[[1874.0,1874.0],[1456.0,950.0],[1819.0,856.0],[1949.0,1374.0]],[[593.0,1572.0],[1791.0,222.0],[455.0,1459.0],[33.0,1047.0]],[[221.0,1255.0],[1551.0,61.0],[1329.0,1385.0],[1264.0,203.0]],[[854.0,334.0],[1346.0,491.0],[271.0,525.0],[1205.0,1677.0]],[[1395.0,952.0],[111.0,749.0],[1498.0,1239.0],[1203.0,1548.0]],[[1722.0,1890.0],[303.0,815.0],[1669.0,948.0],[172.0,986.0]],[[919.0,997.0],[1616.0,1553.0],[860.0,622.0],[1225.0,1474.0]],[[5.0,1258.0],[1819.0,2039.0],[699.0,599.0],[127.0,1518.0]],[[1789.0,1400.0],[2005.0,1300.0],[456.0,1197.0],[1130.0,1759.0]],[[46.0,1272.0],[354.0,2014.0],[470.0,903.0],[1084.0,1789.0]],[[1526.0,944.0],[222.0,419.0],[667.0,531.0],[1196.0,197.0]],[[279.0,893.0],[12.0,253.0],[1732.0,86.0],[271.0,225.0]],[[36.0,142.0],[1389.0,1362.0],[76.0,36.0],[865.0,1920.0]],[[819.0,1090.0],[1209.0,1029.0],[956.0,748.0],[863.0,1603.0]],[[244.0,977.0],[1853.0,144.0],[1357.0,1338.0],[1666.0,490.0]],[[65.0,757.0],[383.0,757.0],[894.0,921.0],[723.0,1245.0]],[[400.0,240.0],[1285.0,599.0],[257.0,1815.0],[614.0,945.0]],[[176.0,1172.0],[1410.0,238.0],[365.0,1812.0],[820.0,933.0]],[[758.0,488.0],[235.0,828.0],[221.0,474.0],[358.0,900.0]],[[1171.0,1032.0],[1731.0,1018.0],[132.0,1031.0],[797.0,1334.0]],[[1433.0,1463.0],[1860.0,1566.0],[1583.0,366.0],[1745.0,1001.0]],[[2004.0,1407.0],[731.0,466.0],[981.0,296.0],[1788.0,1134.0]],[[1244.0,1372.0],[1517.0,1676.0],[1869.0,1492.0],[1441.0,1293.0]],[[1622.0,1930.0],[70.0,1516.0],[521.0,1238.0],[688.0,1237.0]],[[519.0,612.0],[683.0,1874.0],[623.0,553.0],[659.0,326.0]],[[1039.0,964.0],[1457.0,1291.0],[702.0,1135.0],[1937.0,1268.0]],[[316.0,1754.0],[630.0,1446.0],[1841.0,440.0],[638.0,1293.0]],[[283.0,765.0],[1964.0,143.0],[191.0,785.0],[1458.0,1499.0]],[[1455.0,1534.0],[1401.0,493.0],[756.0,1537.0],[133.0,1109.0]],[[860.0,255.0],[1011.0,1246.0],[1339.0,1650.0],[1000.0,1473.0]],[[202.0,949.0],[1190.0,27.0],[800.0,397.0],[554.0,912.0]],[[1510.0,1091.0],[576.0,665.0],[934.0,308.0],[1275.0,1769.0]],[[1799.0,1945.0],[749.0,1456.0],[800.0,1773.0],[303.0,1134.0]],[[840.0,937.0],[582.0,547.0],[852.0,86.0],[670.0,1989.0]],[[1486.0,753.0],[201.0,1475.0],[337.0,972.0],[865.0,356.0]],[[1807.0,804.0],[1402.0,675.0],[73.0,891.0],[1294.0,1967.0]],[[148.0,214.0],[1502.0,2047.0],[1431.0,555.0],[1999.0,279.0]],[[1305.0,1276.0],[1301.0,366.0],[1969.0,1384.0],[1702.0,292.0]],[[1073.0,257.0],[1322.0,78.0],[738.0,1341.0],[924.0,1282.0]],[[1075.0,1033.0],[1254.0,1997.0],[1703.0,49.0],[1206.0,665.0]],[[1191.0,199.0],[474.0,1767.0],[1763.0,890.0],[1139.0,1460.0]],[[2024.0,1152.0],[1048.0,706.0],[1321.0,584.0],[1440.0,387.0]],[[1626.0,1461.0],[787.0,1621.0],[1840.0,614.0],[1970.0,994.0]],[[154.0,1014.0],[323.0,288.0],[157.0,1931.0],[1983.0,1340.0]],[[698.0,2036.0],[1628.0,54.0],[1581.0,1845.0],[677.0,1528.0]],[[211.0,1508.0],[1445.0,1793.0],[972.0,1243.0],[361.0,1809.0]],[[1462.0,799.0],[660.0,551.0],[1811.0,184.0],[1491.0,1381.0]],[[710.0,2008.0],[1959.0,34.0],[958.0,243.0],[1819.0,669.0]],[[853.0,1639.0],[1908.0,505.0],[1289.0,1073.0],[566.0,693.0]],[[1351.0,539.0],[739.0,1262.0],[959.0,1750.0],[1917.0,1875.0]],[[1274.0,695.0],[1264.0,846.0],[1157.0,633.0],[26.0,1394.0]],[[487.0,1742.0],[1556.0,732.0],[1800.0,1840.0],[1811.0,1489.0]],[[845.0,221.0],[348.0,439.0],[398.0,1587.0],[562.0,1816.0]],[[1626.0,745.0],[1945.0,1838.0],[149.0,794.0],[1843.0,2000.0]],[[1596.0,1190.0],[1428.0,710.0],[1119.0,738.0],[112.0,248.0]],[[265.0,941.0],[1825.0,1306.0],[1808.0,1373.0],[416.0,1590.0]],[[220.0,1918.0],[1139.0,1676.0],[1905.0,1356.0],[393.0,672.0]],[[1643.0,1749.0],[1956.0,610.0],[1308.0,597.0],[1433.0,562.0]],[[792.0,921.0],[885.0,1859.0],[637.0,423.0],[421.0,1741.0]],[[215.0,1857.0],[621.0,1534.0],[1317.0,1147.0],[1630.0,58.0]],[[1587.0,1995.0],[1824.0,1235.0],[1241.0,1585.0],[1282.0,1186.0]],[[713.0,410.0],[2004.0,736.0],[1825.0,628.0],[1878.0,432.0]],[[505.0,1304.0],[1295.0,2024.0],[1396.0,1309.0],[1894.0,1324.0]],[[1984.0,1614.0],[893.0,680.0],[987.0,819.0],[1004.0,211.0]],[[1314.0,252.0],[1344.0,1719.0],[121.0,1410.0],[1472.0,1480.0]],[[1674.0,856.0],[1182.0,919.0],[1284.0,1627.0],[1575.0,719.0]],[[34.0,1592.0],[1434.0,910.0],[958.0,269.0],[1311.0,1575.0]],[[834.0,1202.0],[392.0,1777.0],[16.0,1437.0],[381.0,1670.0]],[[627.0,456.0],[734.0,1394.0],[590.0,1538.0],[1789.0,1333.0]],[[1135.0,854.0],[794.0,648.0],[674.0,657.0],[600.0,490.0]],[[1810.0,532.0],[1766.0,548.0],[1367.0,1299.0],[561.0,84.0]],[[1468.0,713.0],[926.0,962.0],[2035.0,2001.0],[140.0,367.0]],[[547.0,1920.0],[584.0,856.0],[1476.0,564.0],[1147.0,1427.0]],[[265.0,1571.0],[1946.0,122.0],[1891.0,806.0],[986.0,844.0]],[[20.0,1245.0],[172.0,1093.0],[775.0,294.0],[433.0,451.0]],[[1639.0,1359.0],[429.0,1824.0],[1977.0,1149.0],[584.0,1766.0]],[[1521.0,1429.0],[1571.0,1685.0],[1786.0,1507.0],[843.0,801.0]],[[267.0,593.0],[974.0,982.0],[85.0,987.0],[1612.0,1870.0]],[[1805.0,390.0],[221.0,705.0],[31.0,181.0],[1762.0,1140.0]],[[1701.0,543.0],[965.0,1533.0],[1698.0,1400.0],[193.0,1861.0]],[[529.0,1491.0],[246.0,1430.0],[480.0,1005.0],[510.0,1788.0]],[[609.0,78.0],[1496.0,532.0],[616.0,1180.0],[101.0,1934.0]],[[109.0,1978.0],[274.0,1765.0],[376.0,1924.0],[396.0,527.0]],[[1612.0,1679.0],[990.0,1555.0],[1956.0,1299.0],[1793.0,478.0]],[[275.0,862.0],[1512.0,427.0],[393.0,1453.0],[432.0,802.0]],[[455.0,358.0],[14.0,1768.0],[960.0,374.0],[1258.0,1997.0]],[[253.0,1757.0],[1221.0,1605.0],[167.0,118.0],[1133.0,1959.0]],[[1793.0,896.0],[1100.0,1317.0],[1956.0,1808.0],[224.0,1101.0]],[[711.0,1793.0],[1865.0,1211.0],[747.0,1314.0],[1629.0,1694.0]],[[1631.0,1955.0],[903.0,1254.0],[70.0,258.0],[605.0,2021.0]],[[474.0,1472.0],[1061.0,1266.0],[1241.0,567.0],[437.0,565.0]],[[1864.0,155.0],[1825.0,1923.0],[1334.0,1520.0],[512.0,59.0]],[[825.0,1100.0],[265.0,1892.0],[1160.0,49.0],[1089.0,88.0]],[[1644.0,458.0],[400.0,1319.0],[1832.0,374.0],[2041.0,1407.0]],[[178.0,769.0],[694.0,227.0],[476.0,174.0],[480.0,1249.0]],[[821.0,663.0],[615.0,933.0],[890.0,367.0],[1445.0,1783.0]],[[1092.0,551.0],[1171.0,1016.0],[284.0,1084.0],[232.0,89.0]],[[1768.0,1156.0],[1944.0,1728.0],[1787.0,278.0],[758.0,879.0]],[[139.0,1758.0],[1697.0,1453.0],[1453.0,607.0],[732.0,925.0]],[[939.0,243.0],[1497.0,274.0],[1828.0,1318.0],[891.0,897.0]],[[1055.0,634.0],[1562.0,439.0],[1956.0,7.0],[1933.0,1278.0]],[[1075.0,1192.0],[854.0,543.0],[1558.0,143.0],[1566.0,1872.0]],[[99.0,539.0],[948.0,2020.0],[405.0,1212.0],[1786.0,822.0]],[[1367.0,402.0],[1019.0,993.0],[2013.0,474.0],[728.0,2033.0]],[[1468.0,1774.0],[1639.0,1727.0],[97.0,1635.0],[579.0,1743.0]],[[521.0,248.0],[1197.0,1591.0],[1761.0,390.0],[825.0,1111.0]],[[1961.0,1729.0],[1082.0,436.0],[1334.0,626.0],[1063.0,100.0]],[[397.0,1518.0],[1860.0,1085.0],[387.0,1163.0],[569.0,346.0]],[[1664.0,1558.0],[114.0,1961.0],[532.0,1603.0],[2015.0,954.0]],[[115.0,1540.0],[253.0,1681.0],[344.0,1023.0],[162.0,1860.0]],[[343.0,1202.0],[162.0,1423.0],[173.0,279.0],[299.0,185.0]],[[1256.0,1451.0],[1261.0,371.0],[1927.0,1464.0],[1338.0,700.0]],[[1454.0,1023.0],[1340.0,953.0],[1017.0,891.0],[1272.0,1253.0]],[[1322.0,1236.0],[19.0,1970.0],[1035.0,942.0],[604.0,989.0]],[[660.0,346.0],[1063.0,1633.0],[829.0,564.0],[675.0,303.0]],[[1295.0,1581.0],[864.0,648.0],[158.0,1825.0],[884.0,1641.0]],[[461.0,1273.0],[900.0,1186.0],[1826.0,1378.0],[341.0,280.0]],[[288.0,945.0],[490.0,1898.0],[1877.0,40.0],[686.0,1876.0]],[[1772.0,449.0],[787.0,63.0],[996.0,1260.0],[877.0,1204.0]],[[1261.0,1081.0],[1431.0,1088.0],[1177.0,194.0],[119.0,43.0]],[[1807.0,173.0],[844.0,315.0],[1292.0,1852.0],[1246.0,468.0]],[[1010.0,454.0],[790.0,123.0],[797.0,555.0],[105.0,1803.0]],[[117.0,931.0],[1946.0,708.0],[36.0,917.0],[566.0,256.0]],[[65.0,561.0],[1312.0,346.0],[1068.0,798.0],[1631.0,32.0]],[[1145.0,1441.0],[1060.0,1578.0],[1654.0,1906.0],[1142.0,362.0]],[[737.0,1963.0],[1613.0,545.0],[853.0,105.0],[211.0,1299.0]],[[592.0,896.0],[1305.0,1625.0],[167.0,1672.0],[1944.0,265.0]],[[140.0,537.0],[1682.0,1595.0],[1112.0,181.0],[891.0,795.0]],[[1246.0,1557.0],[1227.0,93.0],[1092.0,781.0],[665.0,941.0]],[[360.0,863.0],[1967.0,674.0],[215.0,1648.0],[1158.0,60.0]],[[618.0,405.0],[162.0,1761.0],[1945.0,717.0],[893.0,1919.0]],[[441.0,1658.0],[917.0,259.0],[520.0,1384.0],[1944.0,2021.0]],[[1505.0,1772.0],[1016.0,1814.0],[1064.0,1655.0],[1457.0,1582.0]],[[937.0,1545.0],[435.0,740.0],[1411.0,310.0],[105.0,1718.0]],[[2023.0,249.0],[1885.0,451.0],[959.0,1862.0],[1438.0,374.0]],[[1372.0,151.0],[1133.0,1372.0],[531.0,684.0],[1760.0,1276.0]],[[1813.0,996.0],[2004.0,1571.0],[113.0,1043.0],[493.0,1174.0]],[[1063.0,101.0],[345.0,1329.0],[741.0,896.0],[1202.0,331.0]],[[698.0,1865.0],[1523.0,1633.0],[1854.0,1933.0],[420.0,2001.0]],[[341.0,139.0],[242.0,76.0],[1141.0,149.0],[1100.0,1273.0]],[[722.0,1955.0],[1381.0,69.0],[1862.0,1400.0],[972.0,927.0]],[[1416.0,237.0],[93.0,1804.0],[811.0,1612.0],[627.0,734.0]],[[950.0,333.0],[1617.0,167.0],[713.0,1311.0],[19.0,1860.0]],[[665.0,156.0],[1730.0,909.0],[1053.0,1793.0],[773.0,166.0]],[[1546.0,1681.0],[1632.0,1745.0],[1113.0,1813.0],[1380.0,97.0]],[[320.0,1935.0],[1717.0,663.0],[1763.0,656.0],[704.0,1094.0]],[[1691.0,1971.0],[1169.0,1422.0],[1870.0,1628.0],[1542.0,1172.0]],[[983.0,1469.0],[923.0,1084.0],[82.0,296.0],[1078.0,1596.0]],[[657.0,1081.0],[1033.0,2009.0],[64.0,652.0],[1980.0,452.0]],[[899.0,622.0],[462.0,1574.0],[232.0,706.0],[279.0,388.0]],[[1918.0,1918.0],[102.0,237.0],[1111.0,210.0],[1934.0,851.0]],[[1457.0,1793.0],[452.0,1387.0],[1304.0,1565.0],[1593.0,1188.0]],[[338.0,938.0],[1807.0,1431.0],[1750.0,1766.0],[1785.0,1091.0]],[[764.0,617.0],[216.0,1353.0],[1440.0,1542.0],[275.0,1302.0]],[[725.0,595.0],[469.0,836.0],[1954.0,954.0],[1468.0,661.0]],[[832.0,1224.0],[703.0,566.0],[1638.0,1743.0],[2003.0,1437.0]],[[139.0,308.0],[99.0,1507.0],[1019.0,637.0],[874.0,1622.0]],[[1817.0,1117.0],[1745.0,1384.0],[1974.0,1395.0],[332.0,224.0]],[[570.0,1924.0],[721.0,372.0],[33.0,266.0],[98.0,751.0]],[[1141.0,795.0],[1886.0,1647.0],[1111.0,1081.0],[1574.0,431.0]],[[1619.0,1897.0],[988.0,291.0],[1280.0,550.0],[108.0,1550.0]],[[230.0,1189.0],[1413.0,69.0],[1798.0,1299.0],[41.0,1293.0]],[[1605.0,209.0],[1829.0,398.0],[1734.0,1663.0],[504.0,71.0]],[[47.0,1673.0],[1426.0,719.0],[1656.0,166.0],[586.0,1169.0]],[[1683.0,680.0],[1921.0,1202.0],[1049.0,143.0],[1600.0,1687.0]],[[599.0,1327.0],[697.0,1856.0],[1610.0,514.0],[323.0,1609.0]],[[1066.0,1604.0],[2003.0,137.0],[1190.0,653.0],[1101.0,1590.0]],[[1122.0,511.0],[1046.0,36.0],[489.0,437.0],[1916.0,619.0]],[[1908.0,986.0],[973.0,170.0],[920.0,327.0],[443.0,395.0]],[[153.0,467.0],[179.0,1033.0],[1699.0,600.0],[1420.0,467.0]],[[204.0,1595.0],[915.0,652.0],[2004.0,702.0],[1442.0,1630.0]],[[701.0,1335.0],[288.0,203.0],[62.0,1220.0],[407.0,1845.0]],[[356.0,2.0],[194.0,1151.0],[1249.0,1042.0],[1878.0,1569.0]],[[480.0,915.0],[1253.0,514.0],[98.0,1499.0],[1828.0,386.0]],[[1765.0,636.0],[1125.0,466.0],[1528.0,1033.0],[864.0,1345.0]],[[577.0,913.0],[30.0,942.0],[1976.0,1469.0],[521.0,1672.0]],[[1404.0,1750.0],[1802.0,458.0],[1025.0,217.0],[1209.0,1305.0]],[[815.0,852.0],[939.0,991.0],[1540.0,1421.0],[1050.0,6.0]],[[2015.0,575.0],[1751.0,1981.0],[370.0,1130.0],[409.0,898.0]],[[444.0,1745.0],[1659.0,582.0],[469.0,1800.0],[886.0,660.0]],[[882.0,1116.0],[1497.0,1337.0],[1422.0,1031.0],[611.0,127.0]],[[906.0,1053.0],[1974.0,65.0],[1400.0,68.0],[714.0,822.0]],[[1063.0,942.0],[299.0,1745.0],[1511.0,1516.0],[776.0,432.0]],[[18.0,1606.0],[1388.0,1350.0],[1680.0,1405.0],[1054.0,1648.0]],[[1129.0,1446.0],[307.0,1791.0],[913.0,1933.0],[1417.0,1158.0]],[[119.0,434.0],[220.0,700.0],[922.0,1799.0],[1203.0,1733.0]],[[1632.0,18.0],[278.0,1625.0],[625.0,850.0],[1942.0,1612.0]],[[2022.0,404.0],[1679.0,675.0],[2018.0,880.0],[1264.0,148.0]],[[1223.0,1200.0],[568.0,1028.0],[1244.0,1949.0],[546.0,1787.0]],[[1365.0,1315.0],[863.0,1138.0],[162.0,1272.0],[1206.0,2036.0]],[[1224.0,1082.0],[654.0,1186.0],[1077.0,1368.0],[610.0,1060.0]],[[1586.0,1810.0],[2027.0,690.0],[1571.0,162.0],[379.0,842.0]],[[1298.0,209.0],[1251.0,164.0],[1701.0,445.0],[1326.0,529.0]],[[42.0,1410.0],[988.0,1451.0],[1779.0,986.0],[342.0,133.0]],[[1371.0,77.0],[1816.0,106.0],[690.0,1151.0],[857.0,1756.0]],[[1184.0,675.0],[179.0,159.0],[2036.0,1598.0],[456.0,1556.0]],[[1179.0,1786.0],[204.0,938.0],[1366.0,1717.0],[1994.0,832.0]],[[364.0,1378.0],[1657.0,734.0],[964.0,1987.0],[295.0,1716.0]],[[1618.0,893.0],[1047.0,6.0],[1154.0,133.0],[1065.0,349.0]],[[736.0,1034.0],[1838.0,1780.0],[1251.0,411.0],[1217.0,220.0]],[[1954.0,719.0],[1042.0,855.0],[516.0,172.0],[1635.0,40.0]],[[1216.0,11.0],[1563.0,1392.0],[396.0,1051.0],[663.0,818.0]],[[297.0,716.0],[1544.0,95.0],[902.0,1663.0],[73.0,17.0]],[[1702.0,719.0],[218.0,1621.0],[1697.0,781.0],[651.0,909.0]],[[375.0,1851.0],[1369.0,1024.0],[785.0,1047.0],[1591.0,1013.0]],[[1197.0,1055.0],[602.0,1089.0],[1481.0,1128.0],[896.0,775.0]],[[89.0,431.0],[895.0,1129.0],[691.0,1319.0],[899.0,666.0]],[[134.0,897.0],[1588.0,1072.0],[1054.0,869.0],[1070.0,1538.0]],[[171.0,135.0],[630.0,2035.0],[1788.0,1234.0],[1501.0,1661.0]],[[1458.0,810.0],[1173.0,1147.0],[1082.0,1979.0],[625.0,1460.0]],[[579.0,1596.0],[250.0,295.0],[1065.0,308.0],[2021.0,852.0]],[[1858.0,1259.0],[164.0,1101.0],[1380.0,17.0],[2029.0,1767.0]],[[1766.0,1735.0],[1501.0,1990.0],[792.0,1771.0],[1603.0,1184.0]],[[393.0,331.0],[659.0,1381.0],[1496.0,1758.0],[1564.0,504.0]],[[1541.0,212.0],[1776.0,823.0],[461.0,938.0],[1956.0,1571.0]],[[708.0,545.0],[901.0,392.0],[1420.0,1323.0],[1800.0,682.0]],[[1549.0,1983.0],[754.0,153.0],[812.0,1023.0],[537.0,489.0]],[[1121.0,53.0],[20.0,1523.0],[1169.0,879.0],[222.0,1277.0]],[[606.0,521.0],[275.0,640.0],[1712.0,1099.0],[535.0,298.0]],[[791.0,658.0],[1707.0,887.0],[1608.0,2007.0],[709.0,263.0]],[[2041.0,994.0],[835.0,298.0],[621.0,1001.0],[775.0,603.0]],[[1063.0,267.0],[1524.0,323.0],[1456.0,1141.0],[734.0,1923.0]],[[1775.0,904.0],[516.0,481.0],[1783.0,1755.0],[1506.0,917.0]],[[1817.0,1604.0],[1362.0,751.0],[214.0,199.0],[1504.0,1897.0]],[[661.0,1911.0],[1528.0,1442.0],[639.0,1873.0],[823.0,1954.0]],[[1155.0,852.0],[520.0,902.0],[1157.0,433.0],[360.0,929.0]],[[1738.0,877.0],[1231.0,2016.0],[252.0,1538.0],[835.0,218.0]],[[1265.0,1226.0],[863.0,1755.0],[51.0,1870.0],[1333.0,1719.0]],[[999.0,431.0],[690.0,208.0],[1565.0,667.0],[70.0,2031.0]],[[1987.0,1510.0],[1747.0,117.0],[1785.0,1594.0],[972.0,33.0]],[[176.0,818.0],[1292.0,146.0],[552.0,1796.0],[731.0,1851.0]],[[599.0,588.0],[1030.0,1564.0],[380.0,505.0],[290.0,1570.0]],[[1982.0,1501.0],[862.0,154.0],[1676.0,903.0],[1970.0,809.0]],[[691.0,969.0],[807.0,1386.0],[1223.0,1955.0],[963.0,872.0]],[[1153.0,504.0],[41.0,150.0],[1291.0,364.0],[731.0,1868.0]],[[329.0,1678.0],[574.0,177.0],[574.0,1309.0],[1469.0,1851.0]],[[780.0,1639.0],[1898.0,351.0],[1615.0,1498.0],[40.0,1167.0]],[[866.0,1458.0],[1533.0,30.0],[388.0,1824.0],[1660.0,1256.0]],[[709.0,1225.0],[898.0,1351.0],[1361.0,867.0],[167.0,208.0]],[[76.0,745.0],[1894.0,1328.0],[150.0,1089.0],[1112.0,269.0]],[[1023.0,48.0],[532.0,1692.0],[1423.0,1105.0],[2041.0,159.0]],[[1580.0,453.0],[1250.0,1717.0],[1016.0,939.0],[1785.0,1081.0]],[[42.0,23.0],[620.0,1945.0],[610.0,1433.0],[317.0,1013.0]],[[632.0,543.0],[1642.0,568.0],[1352.0,795.0],[530.0,560.0]],[[477.0,521.0],[136.0,1139.0],[1118.0,1443.0],[30.0,595.0]],[[35.0,261.0],[1868.0,1772.0],[1628.0,1267.0],[547.0,1604.0]],[[1745.0,1474.0],[1834.0,1432.0],[1197.0,1946.0],[760.0,1101.0]],[[32.0,1275.0],[941.0,217.0],[2045.0,244.0],[30.0,324.0]],[[1897.0,10.0],[1005.0,542.0],[1605.0,1591.0],[911.0,1133.0]],[[750.0,893.0],[661.0,371.0],[1353.0,1420.0],[352.0,499.0]],[[945.0,838.0],[1345.0,1834.0],[339.0,1766.0],[1459.0,676.0]],[[741.0,416.0],[1451.0,756.0],[2020.0,324.0],[1868.0,1766.0]],[[895.0,259.0],[277.0,1030.0],[1344.0,1605.0],[1508.0,1336.0]],[[1762.0,289.0],[779.0,1686.0],[1423.0,2036.0],[1419.0,488.0]],[[1832.0,1348.0],[35.0,922.0],[1245.0,1682.0],[573.0,784.0]],[[1139.0,189.0],[664.0,1269.0],[233.0,455.0],[1088.0,457.0]],[[736.0,1852.0],[1015.0,1919.0],[1765.0,223.0],[577.0,2018.0]],[[1473.0,1195.0],[1537.0,364.0],[1790.0,531.0],[955.0,1753.0]],[[1993.0,256.0],[1481.0,758.0],[253.0,835.0],[776.0,76.0]],[[1421.0,973.0],[978.0,1682.0],[1699.0,676.0],[961.0,3.0]],[[899.0,232.0],[636.0,369.0],[101.0,582.0],[1091.0,940.0]],[[1477.0,1362.0],[564.0,384.0],[1047.0,1690.0],[1456.0,173.0]],[[254.0,1877.0],[154.0,1288.0],[1275.0,1229.0],[1596.0,1256.0]],[[1576.0,1976.0],[1206.0,491.0],[46.0,433.0],[1736.0,301.0]],[[854.0,504.0],[38.0,1006.0],[1921.0,290.0],[871.0,1396.0]],[[879.0,1212.0],[1170.0,1905.0],[1905.0,861.0],[1895.0,1542.0]],[[342.0,126.0],[302.0,1232.0],[1840.0,839.0],[1209.0,1697.0]],[[757.0,1616.0],[1536.0,1896.0],[906.0,1010.0],[2022.0,57.0]],[[1198.0,1099.0],[1942.0,2021.0],[1441.0,448.0],[491.0,876.0]],[[1828.0,1589.0],[880.0,1724.0],[252.0,720.0],[1583.0,1741.0]],[[1530.0,580.0],[278.0,654.0],[184.0,868.0],[1905.0,1269.0]],[[1232.0,1947.0],[551.0,86.0],[1848.0,1776.0],[1413.0,1784.0]],[[1488.0,892.0],[1106.0,832.0],[1888.0,1940.0],[1111.0,1701.0]],[[1165.0,1134.0],[1817.0,269.0],[455.0,1332.0],[1833.0,1176.0]],[[929.0,1311.0],[1016.0,635.0],[643.0,1041.0],[1016.0,1686.0]],[[123.0,1758.0],[1630.0,923.0],[557.0,294.0],[347.0,676.0]],[[1919.0,1554.0],[900.0,1196.0],[1602.0,1099.0],[32.0,1162.0]],[[613.0,492.0],[1765.0,1153.0],[1232.0,1714.0],[250.0,609.0]],[[398.0,678.0],[1996.0,1773.0],[454.0,235.0],[1469.0,1303.0]],[[1258.0,147.0],[1254.0,1848.0],[128.0,1409.0],[1165.0,870.0]],[[1079.0,1121.0],[691.0,1175.0],[1385.0,367.0],[145.0,527.0]],[[538.0,1571.0],[1323.0,1388.0],[1929.0,685.0],[1199.0,111.0]],[[1086.0,72.0],[94.0,1721.0],[1900.0,99.0],[1593.0,435.0]],[[509.0,67.0],[1571.0,366.0],[2045.0,879.0],[1449.0,133.0]],[[1678.0,1933.0],[1307.0,775.0],[34.0,520.0],[1932.0,1928.0]],[[1026.0,1770.0],[412.0,1704.0],[1853.0,1208.0],[381.0,213.0]],[[1735.0,630.0],[1437.0,811.0],[339.0,1869.0],[1481.0,453.0]],[[1356.0,412.0],[833.0,1301.0],[649.0,657.0],[1353.0,334.0]],[[854.0,1201.0],[269.0,2009.0],[1889.0,2048.0],[1820.0,1581.0]],[[1491.0,1945.0],[714.0,583.0],[1.0,717.0],[1263.0,725.0]],[[614.0,849.0],[550.0,998.0],[1873.0,565.0],[347.0,1984.0]],[[1595.0,1615.0],[1737.0,1786.0],[1927.0,1147.0],[1955.0,513.0]],[[810.0,1548.0],[144.0,1123.0],[575.0,1802.0],[891.0,635.0]],[[1598.0,1811.0],[253.0,1423.0],[925.0,639.0],[1170.0,2005.0]],[[1354.0,627.0],[264.0,1611.0],[299.0,303.0],[0.0,123.0]],[[307.0,357.0],[536.0,1030.0],[251.0,853.0],[1764.0,1383.0]],[[1140.0,1455.0],[820.0,649.0],[1678.0,328.0],[1451.0,472.0]],[[1731.0,1846.0],[1366.0,416.0],[42.0,229.0],[607.0,1670.0]],[[864.0,826.0],[279.0,656.0],[1865.0,97.0],[1339.0,1206.0]],[[1271.0,628.0],[1852.0,214.0],[179.0,1180.0],[652.0,99.0]],[[1293.0,97.0],[605.0,1032.0],[436.0,956.0],[1050.0,2026.0]],[[2044.0,785.0],[316.0,536.0],[1169.0,123.0],[966.0,645.0]],[[716.0,997.0],[1884.0,440.0],[14.0,801.0],[1497.0,698.0]],[[1106.0,388.0],[330.0,1230.0],[950.0,1543.0],[1219.0,555.0]],[[1234.0,570.0],[1219.0,493.0],[1226.0,411.0],[854.0,1802.0]],[[1636.0,400.0],[124.0,1619.0],[1952.0,31.0],[1203.0,1922.0]],[[1920.0,1511.0],[737.0,857.0],[1954.0,817.0],[927.0,564.0]],[[1772.0,813.0],[1493.0,2012.0],[933.0,199.0],[1006.0,470.0]],[[1487.0,273.0],[174.0,870.0],[1769.0,1356.0],[1667.0,1840.0]],[[1809.0,1885.0],[1839.0,1520.0],[160.0,833.0],[1063.0,533.0]],[[443.0,1700.0],[819.0,1341.0],[422.0,21.0],[914.0,812.0]],[[1573.0,798.0],[1241.0,1265.0],[1533.0,953.0],[115.0,1022.0]],[[1136.0,1249.0],[742.0,468.0],[60.0,1425.0],[632.0,1595.0]],[[2011.0,1864.0],[460.0,925.0],[1438.0,252.0],[336.0,988.0]],[[703.0,808.0],[1751.0,575.0],[1550.0,1642.0],[1442.0,336.0]],[[152.0,1865.0],[1448.0,1179.0],[1524.0,1347.0],[1532.0,45.0]],[[468.0,1584.0],[1235.0,1119.0],[239.0,1965.0],[1132.0,213.0]],[[2013.0,1301.0],[1754.0,1866.0],[901.0,698.0],[168.0,1642.0]],[[1050.0,785.0],[1289.0,824.0],[457.0,685.0],[1722.0,1727.0]],[[1035.0,528.0],[380.0,1056.0],[981.0,1144.0],[753.0,1856.0]],[[1743.0,69.0],[592.0,1250.0],[567.0,581.0],[1685.0,150.0]],[[1913.0,2029.0],[183.0,1584.0],[434.0,1204.0],[1693.0,1897.0]],[[440.0,1750.0],[1681.0,109.0],[1075.0,253.0],[1193.0,1062.0]],[[1332.0,117.0],[573.0,225.0],[894.0,1294.0],[397.0,671.0]],[[1236.0,1691.0],[587.0,324.0],[2030.0,258.0],[1744.0,1497.0]],[[612.0,1886.0],[1663.0,1342.0],[1155.0,2042.0],[318.0,553.0]],[[73.0,360.0],[840.0,1489.0],[1965.0,607.0],[715.0,543.0]],[[1739.0,186.0],[305.0,1458.0],[1277.0,1028.0],[1476.0,1515.0]],[[1270.0,1665.0],[1632.0,1949.0],[1795.0,1508.0],[1335.0,1690.0]],[[620.0,543.0],[1957.0,1025.0],[1035.0,1749.0],[1931.0,198.0]],[[1204.0,2020.0],[1411.0,2027.0],[538.0,1830.0],[593.0,1942.0]],[[619.0,953.0],[1364.0,287.0],[1495.0,696.0],[1720.0,1678.0]],[[1246.0,1105.0],[904.0,41.0],[1965.0,1464.0],[331.0,1076.0]],[[1990.0,1609.0],[1881.0,186.0],[1749.0,1036.0],[1996.0,612.0]],[[1318.0,607.0],[843.0,1561.0],[498.0,454.0],[1316.0,588.0]],[[1921.0,1839.0],[632.0,2023.0],[638.0,249.0],[775.0,1632.0]],[[1369.0,1059.0],[1999.0,1185.0],[151.0,1785.0],[329.0,878.0]],[[109.0,1310.0],[1657.0,1194.0],[1008.0,1229.0],[1768.0,1433.0]],[[1809.0,1328.0],[1137.0,493.0],[1522.0,139.0],[1182.0,832.0]],[[445.0,1058.0],[69.0,1056.0],[1368.0,452.0],[1632.0,1887.0]],[[1207.0,1145.0],[1526.0,591.0],[2016.0,236.0],[427.0,1551.0]],[[1820.0,1282.0],[28.0,1911.0],[963.0,558.0],[1284.0,614.0]],[[835.0,1987.0],[703.0,1152.0],[1411.0,898.0],[849.0,250.0]],[[1861.0,1129.0],[1898.0,1888.0],[1924.0,1495.0],[1749.0,1732.0]],[[279.0,921.0],[1411.0,227.0],[1331.0,425.0],[1571.0,2047.0]],[[1355.0,583.0],[831.0,280.0],[1098.0,2035.0],[1992.0,1919.0]],[[1305.0,1906.0],[328.0,2017.0],[1147.0,464.0],[539.0,1706.0]],[[381.0,592.0],[1565.0,394.0],[1735.0,893.0],[600.0,15.0]],[[460.0,415.0],[335.0,1353.0],[509.0,1533.0],[1707.0,1616.0]],[[305.0,1695.0],[1847.0,1229.0],[1785.0,1804.0],[1629.0,546.0]],[[1872.0,1958.0],[1585.0,434.0],[1360.0,1136.0],[578.0,1084.0]],[[178.0,387.0],[681.0,145.0],[18.0,1339.0],[1384.0,168.0]],[[662.0,1727.0],[1798.0,70.0],[1766.0,1645.0],[500.0,1618.0]],[[232.0,112.0],[558.0,983.0],[1990.0,1599.0],[1285.0,525.0]],[[1181.0,570.0],[573.0,578.0],[597.0,970.0],[812.0,125.0]],[[870.0,2005.0],[1875.0,1490.0],[1923.0,1753.0],[2.0,1720.0]],[[977.0,1552.0],[1092.0,109.0],[1326.0,445.0],[1005.0,1755.0]],[[1052.0,529.0],[1916.0,1504.0],[1031.0,496.0],[373.0,1433.0]],[[1658.0,1810.0],[1493.0,1727.0],[1798.0,2046.0],[1542.0,115.0]],[[196.0,1998.0],[1321.0,946.0],[422.0,80.0],[1433.0,315.0]],[[735.0,1946.0],[502.0,946.0],[592.0,1882.0],[309.0,686.0]],[[1143.0,1939.0],[1494.0,765.0],[954.0,178.0],[1197.0,1816.0]],[[1856.0,1154.0],[1006.0,45.0],[1245.0,1925.0],[609.0,812.0]],[[806.0,743.0],[1254.0,295.0],[1051.0,690.0],[1604.0,1238.0]],[[740.0,1861.0],[1630.0,383.0],[1463.0,1461.0],[944.0,11.0]],[[673.0,1862.0],[515.0,1156.0],[1583.0,608.0],[1379.0,1404.0]],[[1026.0,13.0],[587.0,770.0],[1053.0,872.0],[25.0,237.0]],[[148.0,1881.0],[1165.0,911.0],[449.0,319.0],[612.0,831.0]],[[729.0,127.0],[1784.0,642.0],[703.0,1802.0],[1313.0,212.0]],[[1829.0,1464.0],[1175.0,522.0],[215.0,996.0],[465.0,1852.0]],[[2013.0,941.0],[1296.0,457.0],[1253.0,618.0],[1091.0,1719.0]],[[1085.0,470.0],[74.0,17.0],[1518.0,753.0],[232.0,1340.0]],[[651.0,173.0],[141.0,120.0],[1070.0,1014.0],[125.0,1193.0]],[[1975.0,2045.0],[1383.0,366.0],[817.0,717.0],[1438.0,365.0]],[[1515.0,591.0],[1474.0,794.0],[1891.0,1551.0],[1835.0,1420.0]],[[320.0,1010.0],[955.0,389.0],[966.0,361.0],[1278.0,1514.0]],[[332.0,499.0],[1476.0,1021.0],[1161.0,1268.0],[510.0,685.0]],[[1665.0,867.0],[1900.0,559.0],[806.0,325.0],[1777.0,297.0]],[[1561.0,630.0],[999.0,1234.0],[1049.0,1961.0],[1582.0,480.0]],[[444.0,1472.0],[1860.0,1974.0],[1616.0,869.0],[1365.0,615.0]],[[1099.0,1331.0],[802.0,184.0],[1648.0,1088.0],[1318.0,440.0]],[[543.0,835.0],[1529.0,1926.0],[1329.0,176.0],[225.0,1877.0]],[[549.0,1860.0],[2043.0,873.0],[1139.0,1054.0],[639.0,1163.0]],[[486.0,1301.0],[915.0,1399.0],[1280.0,804.0],[497.0,1702.0]],[[864.0,1722.0],[544.0,363.0],[1591.0,119.0],[1580.0,570.0]],[[1613.0,1416.0],[1624.0,599.0],[381.0,945.0],[817.0,1992.0]],[[1937.0,1551.0],[1301.0,1034.0],[36.0,1067.0],[99.0,1561.0]],[[1610.0,592.0],[698.0,1063.0],[406.0,1666.0],[467.0,1956.0]],[[1654.0,219.0],[1998.0,334.0],[325.0,911.0],[1381.0,1580.0]],[[1406.0,1456.0],[1027.0,989.0],[1678.0,562.0],[906.0,1642.0]],[[190.0,1008.0],[769.0,604.0],[1388.0,767.0],[445.0,853.0]],[[1722.0,215.0],[1361.0,1480.0],[1430.0,1788.0],[933.0,1435.0]],[[1559.0,292.0],[921.0,1916.0],[525.0,1461.0],[1510.0,378.0]],[[1896.0,1712.0],[1546.0,1076.0],[300.0,1875.0],[1912.0,610.0]],[[1079.0,58.0],[1484.0,1735.0],[968.0,1438.0],[1907.0,1357.0]],[[1805.0,47.0],[592.0,984.0],[405.0,922.0],[1116.0,1495.0]],[[917.0,755.0],[1821.0,1465.0],[1506.0,159.0],[747.0,1592.0]],[[1447.0,1423.0],[1674.0,1237.0],[1066.0,1877.0],[336.0,218.0]],[[424.0,1103.0],[1268.0,870.0],[1749.0,819.0],[1006.0,1142.0]],[[376.0,1708.0],[1606.0,1178.0],[1197.0,1989.0],[378.0,1691.0]],[[919.0,818.0],[1972.0,497.0],[1470.0,341.0],[128.0,334.0]],[[1323.0,1000.0],[1812.0,371.0],[789.0,135.0],[1807.0,543.0]],[[350.0,1928.0],[264.0,204.0],[590.0,2024.0],[513.0,2024.0]],[[1786.0,1963.0],[1205.0,46.0],[1024.0,487.0],[373.0,1496.0]],[[137.0,955.0],[620.0,89.0],[1560.0,171.0],[542.0,1365.0]],[[1569.0,297.0],[1844.0,1261.0],[1342.0,847.0],[1748.0,1982.0]],[[262.0,1559.0],[1032.0,18.0],[431.0,1237.0],[901.0,1548.0]],[[53.0,1603.0],[309.0,368.0],[997.0,256.0],[1716.0,1830.0]],[[1274.0,133.0],[588.0,2023.0],[1987.0,1505.0],[614.0,477.0]],[[845.0,1096.0],[57.0,2035.0],[1854.0,589.0],[604.0,1295.0]],[[1639.0,1808.0],[1116.0,1878.0],[1516.0,1625.0],[343.0,89.0]],[[883.0,912.0],[1009.0,1423.0],[1774.0,393.0],[339.0,119.0]],[[956.0,1357.0],[983.0,822.0],[670.0,344.0],[661.0,251.0]],[[1230.0,1026.0],[1367.0,1425.0],[1735.0,1522.0],[843.0,6.0]],[[2044.0,536.0],[731.0,1561.0],[8.0,746.0],[68.0,1085.0]],[[1498.0,894.0],[1666.0,775.0],[997.0,1712.0],[831.0,1701.0]],[[1554.0,176.0],[700.0,5.0],[851.0,410.0],[235.0,1192.0]],[[603.0,1609.0],[1475.0,753.0],[690.0,669.0],[602.0,2047.0]],[[362.0,1832.0],[748.0,1179.0],[1094.0,1432.0],[1812.0,992.0]],[[178.0,937.0],[891.0,1101.0],[980.0,1762.0],[1146.0,963.0]],[[1473.0,2007.0],[1683.0,827.0],[1878.0,1292.0],[190.0,952.0]],[[911.0,635.0],[1734.0,504.0],[300.0,1706.0],[1744.0,1560.0]],[[1876.0,387.0],[829.0,241.0],[1600.0,854.0],[864.0,1770.0]],[[1931.0,1532.0],[430.0,1541.0],[1204.0,1505.0],[1281.0,720.0]],[[1727.0,1009.0],[779.0,307.0],[929.0,350.0],[1042.0,1720.0]],[[913.0,2016.0],[1048.0,137.0],[1613.0,1411.0],[1644.0,1901.0]],[[1707.0,836.0],[223.0,1169.0],[951.0,618.0],[585.0,1379.0]],[[1215.0,1848.0],[1743.0,1234.0],[1532.0,1282.0],[1062.0,931.0]],[[1857.0,1615.0],[1350.0,156.0],[862.0,390.0],[558.0,1012.0]],[[1440.0,589.0],[1830.0,1634.0],[1026.0,51.0],[1706.0,1293.0]],[[586.0,1304.0],[283.0,847.0],[1582.0,861.0],[1638.0,369.0]],[[1917.0,865.0],[461.0,567.0],[1556.0,457.0],[1581.0,1003.0]],[[1912.0,1978.0],[335.0,662.0],[23.0,1445.0],[230.0,1882.0]],[[559.0,2047.0],[1571.0,826.0],[773.0,251.0],[1393.0,805.0]],[[1960.0,1148.0],[731.0,2037.0],[1709.0,196.0],[635.0,787.0]],[[41.0,1259.0],[1715.0,292.0],[755.0,98.0],[1542.0,1185.0]],[[607.0,1168.0],[564.0,699.0],[1222.0,957.0],[1263.0,1837.0]],[[866.0,796.0],[213.0,843.0],[1541.0,1342.0],[1459.0,1569.0]],[[180.0,1619.0],[361.0,644.0],[2021.0,630.0],[1443.0,1266.0]],[[740.0,164.0],[1974.0,1888.0],[1459.0,1412.0],[1422.0,891.0]],[[547.0,988.0],[1697.0,258.0],[982.0,1053.0],[1226.0,1899.0]],[[1369.0,1813.0],[66.0,2014.0],[1998.0,543.0],[108.0,1741.0]],[[1586.0,766.0],[1170.0,1547.0],[780.0,1635.0],[105.0,996.0]],[[1983.0,1392.0],[1484.0,1823.0],[1267.0,322.0],[237.0,1291.0]],[[644.0,557.0],[216.0,1481.0],[1935.0,990.0],[174.0,142.0]],[[59.0,1955.0],[1878.0,1912.0],[1758.0,994.0],[1662.0,720.0]],[[424.0,994.0],[1166.0,1246.0],[942.0,102.0],[432.0,841.0]],[[1759.0,1169.0],[2030.0,1148.0],[1255.0,449.0],[1910.0,568.0]],[[1151.0,1281.0],[1275.0,1391.0],[145.0,1216.0],[805.0,1045.0]],[[1902.0,912.0],[13.0,1282.0],[1870.0,454.0],[264.0,1746.0]],[[1446.0,1033.0],[172.0,573.0],[1250.0,1534.0],[1406.0,1635.0]],[[733.0,214.0],[1917.0,1336.0],[669.0,939.0],[1966.0,667.0]],[[1747.0,1630.0],[448.0,1279.0],[374.0,1880.0],[665.0,1782.0]],[[2009.0,574.0],[258.0,127.0],[1963.0,542.0],[978.0,182.0]],[[1235.0,1695.0],[1897.0,1053.0],[1428.0,1364.0],[1496.0,138.0]],[[737.0,1749.0],[911.0,2034.0],[1521.0,1036.0],[995.0,270.0]],[[1063.0,1198.0],[138.0,1202.0],[1958.0,1973.0],[670.0,378.0]],[[815.0,205.0],[1390.0,1171.0],[270.0,925.0],[694.0,595.0]],[[1774.0,1285.0],[818.0,1904.0],[758.0,3.0],[828.0,207.0]],[[71.0,313.0],[1584.0,1480.0],[1790.0,768.0],[660.0,20.0]],[[1744.0,129.0],[1007.0,254.0],[1609.0,461.0],[1513.0,1533.0]],[[547.0,1559.0],[384.0,1303.0],[2006.0,15.0],[1915.0,962.0]],[[1653.0,327.0],[1773.0,1540.0],[78.0,1409.0],[1201.0,949.0]],[[1631.0,2033.0],[1655.0,1512.0],[204.0,252.0],[1669.0,1754.0]],[[643.0,594.0],[1354.0,780.0],[577.0,2014.0],[1692.0,1284.0]],[[24.0,1497.0],[1526.0,1484.0],[328.0,1571.0],[539.0,148.0]],[[579.0,202.0],[1264.0,1083.0],[1363.0,166.0],[324.0,522.0]],[[562.0,982.0],[1300.0,863.0],[644.0,1818.0],[815.0,1673.0]],[[1525.0,539.0],[1274.0,751.0],[1884.0,101.0],[730.0,499.0]],[[129.0,577.0],[1696.0,1195.0],[870.0,233.0],[290.0,1737.0]],[[1099.0,1925.0],[1806.0,1906.0],[333.0,1405.0],[435.0,1228.0]],[[938.0,182.0],[973.0,475.0],[842.0,733.0],[1609.0,1659.0]],[[527.0,946.0],[846.0,1998.0],[628.0,477.0],[1569.0,1822.0]],[[1470.0,85.0],[1971.0,1998.0],[240.0,1020.0],[1162.0,710.0]],[[1920.0,279.0],[1302.0,354.0],[1069.0,1236.0],[531.0,243.0]],[[1291.0,324.0],[603.0,2048.0],[533.0,707.0],[100.0,2.0]],[[251.0,283.0],[1478.0,1954.0],[196.0,317.0],[1882.0,1861.0]],[[72.0,1128.0],[1457.0,1837.0],[329.0,1421.0],[263.0,716.0]],[[725.0,17.0],[1616.0,793.0],[917.0,633.0],[1992.0,502.0]],[[1424.0,2010.0],[421.0,724.0],[2048.0,1265.0],[398.0,1228.0]],[[361.0,477.0],[1319.0,1807.0],[1181.0,1801.0],[1182.0,1798.0]],[[1890.0,612.0],[1244.0,1104.0],[317.0,1171.0],[138.0,1623.0]],[[532.0,2005.0],[1324.0,1074.0],[497.0,1185.0],[1784.0,908.0]],[[999.0,1599.0],[298.0,1647.0],[517.0,1039.0],[172.0,1038.0]],[[963.0,1388.0],[330.0,1058.0],[1562.0,427.0],[538.0,990.0]],[[1991.0,1327.0],[1893.0,1666.0],[332.0,1918.0],[147.0,1779.0]],[[813.0,1614.0],[1066.0,524.0],[545.0,1546.0],[226.0,73.0]],[[219.0,1805.0],[15.0,1417.0],[1824.0,1337.0],[760.0,856.0]],[[1805.0,877.0],[819.0,1594.0],[1359.0,1813.0],[1142.0,1123.0]],[[661.0,1229.0],[357.0,288.0],[1964.0,998.0],[391.0,2046.0]],[[491.0,1842.0],[683.0,462.0],[1330.0,1545.0],[918.0,392.0]],[[1846.0,936.0],[458.0,357.0],[1950.0,1031.0],[1238.0,81.0]],[[1366.0,1574.0],[999.0,1766.0],[625.0,1838.0],[278.0,1948.0]],[[1050.0,1677.0],[278.0,500.0],[1573.0,485.0],[1095.0,1549.0]],[[131.0,376.0],[1409.0,305.0],[1605.0,1924.0],[1963.0,643.0]],[[1638.0,173.0],[1070.0,1631.0],[1605.0,1578.0],[1853.0,63.0]],[[994.0,535.0],[300.0,2043.0],[1655.0,858.0],[439.0,1891.0]],[[804.0,1655.0],[1663.0,1780.0],[105.0,1149.0],[89.0,178.0]],[[1992.0,1713.0],[535.0,721.0],[774.0,1541.0],[1162.0,324.0]],[[173.0,1692.0],[598.0,1912.0],[651.0,1216.0],[162.0,1231.0]],[[1198.0,128.0],[1341.0,1203.0],[130.0,1997.0],[355.0,669.0]],[[1569.0,2019.0],[1080.0,1839.0],[92.0,1720.0],[143.0,1208.0]],[[201.0,1421.0],[817.0,1402.0],[740.0,1002.0],[566.0,372.0]],[[166.0,386.0],[632.0,1258.0],[1294.0,2019.0],[1941.0,87.0]],[[1577.0,1553.0],[960.0,582.0],[428.0,1708.0],[1580.0,916.0]],[[34.0,1295.0],[1679.0,1591.0],[894.0,543.0],[1790.0,723.0]],[[448.0,461.0],[1220.0,719.0],[1440.0,1935.0],[2038.0,657.0]],[[1094.0,982.0],[1081.0,288.0],[1332.0,1002.0],[899.0,1076.0]],[[661.0,536.0],[232.0,1895.0],[1460.0,528.0],[1017.0,1247.0]],[[169.0,1738.0],[1829.0,2018.0],[217.0,710.0],[1549.0,2041.0]],[[1280.0,1256.0],[1139.0,648.0],[1465.0,1509.0],[379.0,1758.0]],[[992.0,1488.0],[386.0,1443.0],[994.0,270.0],[1501.0,1272.0]],[[176.0,1450.0],[51.0,1577.0],[393.0,9.0],[9.0,733.0]],[[1892.0,446.0],[886.0,1528.0],[272.0,565.0],[1641.0,754.0]],[[1793.0,388.0],[1115.0,1962.0],[746.0,1533.0],[618.0,495.0]],[[546.0,318.0],[1622.0,660.0],[747.0,919.0],[1176.0,438.0]],[[201.0,891.0],[25.0,881.0],[51.0,1811.0],[785.0,1540.0]],[[1216.0,611.0],[1389.0,1523.0],[1551.0,443.0],[795.0,1389.0]],[[33.0,1730.0],[1828.0,791.0],[677.0,90.0],[1078.0,1918.0]],[[953.0,337.0],[266.0,880.0],[574.0,1018.0],[981.0,1478.0]],[[76.0,810.0],[1842.0,131.0],[404.0,713.0],[1683.0,526.0]],[[1989.0,940.0],[982.0,230.0],[1521.0,692.0],[668.0,1767.0]],[[1007.0,1101.0],[1418.0,831.0],[1209.0,969.0],[419.0,168.0]],[[1350.0,1252.0],[731.0,515.0],[1692.0,1301.0],[1164.0,95.0]],[[1014.0,117.0],[1302.0,1954.0],[207.0,838.0],[1635.0,405.0]],[[1802.0,1658.0],[2023.0,829.0],[1833.0,438.0],[788.0,718.0]],[[1055.0,1075.0],[30.0,275.0],[1582.0,75.0],[783.0,1363.0]],[[1122.0,840.0],[1957.0,606.0],[1852.0,169.0],[1557.0,1617.0]],[[1646.0,226.0],[247.0,1184.0],[1448.0,959.0],[804.0,1882.0]],[[1925.0,1922.0],[154.0,782.0],[482.0,1316.0],[1226.0,1753.0]],[[1019.0,643.0],[1135.0,1091.0],[1534.0,438.0],[1472.0,1740.0]],[[1736.0,1848.0],[1962.0,915.0],[402.0,724.0],[1848.0,1913.0]],[[233.0,419.0],[345.0,1642.0],[1633.0,1089.0],[783.0,2015.0]],[[1464.0,1539.0],[462.0,50.0],[972.0,2001.0],[1578.0,1077.0]],[[1092.0,349.0],[664.0,1613.0],[401.0,210.0],[868.0,1412.0]],[[737.0,712.0],[1190.0,472.0],[959.0,60.0],[1713.0,1180.0]],[[642.0,597.0],[546.0,1342.0],[779.0,503.0],[1369.0,2021.0]],[[827.0,1279.0],[160.0,781.0],[722.0,1352.0],[780.0,787.0]],[[1735.0,453.0],[1336.0,1103.0],[731.0,10.0],[1242.0,1567.0]],[[1580.0,1655.0],[260.0,1298.0],[1376.0,552.0],[1061.0,1096.0]],[[1807.0,654.0],[1888.0,784.0],[1571.0,1922.0],[382.0,1811.0]],[[498.0,765.0],[1052.0,1267.0],[1680.0,1205.0],[1223.0,816.0]],[[1462.0,533.0],[880.0,426.0],[1765.0,887.0],[1073.0,969.0]],[[540.0,278.0],[1381.0,213.0],[1826.0,1026.0],[239.0,235.0]],[[1006.0,150.0],[1450.0,380.0],[692.0,739.0],[784.0,768.0]],[[177.0,47.0],[1673.0,2023.0],[245.0,982.0],[984.0,442.0]],[[1331.0,1746.0],[723.0,131.0],[1582.0,1248.0],[1449.0,126.0]],[[1882.0,1398.0],[1581.0,1793.0],[2043.0,1939.0],[1455.0,670.0]],[[1790.0,249.0],[1346.0,1061.0],[196.0,127.0],[1573.0,630.0]],[[1945.0,804.0],[1597.0,1914.0],[731.0,927.0],[244.0,673.0]],[[1684.0,1856.0],[4.0,811.0],[190.0,1624.0],[301.0,1647.0]],[[23.0,579.0],[921.0,1636.0],[1389.0,852.0],[419.0,1593.0]],[[1297.0,134.0],[313.0,827.0],[1434.0,1441.0],[174.0,1750.0]],[[1252.0,1783.0],[1201.0,658.0],[691.0,549.0],[51.0,2.0]],[[1784.0,881.0],[909.0,1798.0],[393.0,30.0],[1787.0,652.0]],[[1179.0,1892.0],[761.0,1600.0],[786.0,1188.0],[1297.0,470.0]],[[484.0,485.0],[1981.0,210.0],[1573.0,1456.0],[226.0,432.0]],[[1900.0,1094.0],[238.0,1342.0],[1792.0,512.0],[1272.0,1876.0]],[[195.0,519.0],[1180.0,464.0],[500.0,333.0],[1754.0,1763.0]],[[351.0,1732.0],[1457.0,689.0],[2017.0,2045.0],[1698.0,1202.0]],[[1892.0,1913.0],[991.0,855.0],[788.0,540.0],[254.0,1134.0]],[[56.0,1809.0],[1837.0,718.0],[853.0,1184.0],[1239.0,595.0]],[[348.0,755.0],[369.0,682.0],[698.0,1668.0],[689.0,873.0]],[[1727.0,1035.0],[1389.0,628.0],[950.0,1698.0],[1344.0,46.0]],[[945.0,699.0],[1197.0,232.0],[458.0,924.0],[124.0,1746.0]],[[18.0,138.0],[713.0,77.0],[1800.0,1734.0],[600.0,1491.0]],[[1642.0,923.0],[2028.0,1144.0],[499.0,1180.0],[96.0,1201.0]],[[253.0,1172.0],[225.0,377.0],[1516.0,1458.0],[469.0,1844.0]],[[1124.0,140.0],[227.0,1118.0],[1387.0,1428.0],[1004.0,1149.0]],[[2007.0,1082.0],[276.0,939.0],[1672.0,1559.0],[1924.0,664.0]],[[1691.0,1877.0],[1779.0,907.0],[1870.0,335.0],[1616.0,1556.0]],[[772.0,822.0],[545.0,153.0],[585.0,1871.0],[1438.0,1443.0]],[[384.0,1038.0],[987.0,1309.0],[1268.0,72.0],[1045.0,1780.0]],[[1863.0,1087.0],[1395.0,340.0],[50.0,1100.0],[1743.0,633.0]],[[946.0,1521.0],[1577.0,20.0],[967.0,717.0],[909.0,490.0]],[[786.0,385.0],[790.0,945.0],[173.0,1695.0],[1400.0,590.0]],[[51.0,1909.0],[886.0,248.0],[140.0,409.0],[147.0,768.0]],[[1447.0,257.0],[1542.0,888.0],[1304.0,1602.0],[1192.0,702.0]],[[1196.0,1264.0],[1143.0,1484.0],[935.0,901.0],[489.0,1547.0]],[[582.0,1474.0],[1163.0,1440.0],[1459.0,215.0],[232.0,370.0]],[[1778.0,1388.0],[1460.0,986.0],[1249.0,1169.0],[1582.0,1321.0]],[[683.0,609.0],[410.0,621.0],[911.0,1239.0],[1780.0,1728.0]],[[1079.0,1498.0],[1265.0,1812.0],[1832.0,231.0],[1863.0,1680.0]],[[1.0,506.0],[1220.0,742.0],[298.0,461.0],[979.0,1486.0]],[[1835.0,1501.0],[1185.0,615.0],[1136.0,419.0],[528.0,2002.0]],[[1357.0,950.0],[1443.0,154.0],[228.0,481.0],[752.0,2035.0]],[[1863.0,382.0],[1663.0,250.0],[614.0,296.0],[1244.0,45.0]],[[1879.0,993.0],[945.0,884.0],[534.0,1662.0],[541.0,610.0]],[[641.0,1449.0],[229.0,1523.0],[120.0,2032.0],[1851.0,377.0]],[[143.0,1835.0],[562.0,1566.0],[1088.0,247.0],[155.0,155.0]],[[754.0,910.0],[1155.0,486.0],[1248.0,756.0],[146.0,438.0]],[[1959.0,608.0],[1041.0,472.0],[344.0,1347.0],[543.0,944.0]],[[931.0,1377.0],[1803.0,1427.0],[46.0,269.0],[1118.0,757.0]],[[59.0,1514.0],[1205.0,697.0],[46.0,2009.0],[686.0,1485.0]],[[1496.0,1758.0],[2046.0,1933.0],[1411.0,1672.0],[400.0,309.0]],[[404.0,937.0],[1330.0,845.0],[154.0,244.0],[1442.0,906.0]],[[1708.0,1543.0],[211.0,209.0],[1771.0,1137.0],[1535.0,299.0]],[[423.0,1345.0],[735.0,1425.0],[1590.0,1912.0],[650.0,717.0]],[[1717.0,1933.0],[774.0,108.0],[652.0,811.0],[751.0,331.0]],[[107.0,366.0],[781.0,1854.0],[1054.0,249.0],[1632.0,1104.0]],[[1727.0,970.0],[1851.0,508.0],[284.0,868.0],[851.0,891.0]],[[125.0,717.0],[1686.0,2002.0],[1800.0,1356.0],[728.0,784.0]],[[1722.0,380.0],[1561.0,1490.0],[1482.0,353.0],[1883.0,30.0]],[[802.0,1142.0],[1461.0,1471.0],[114.0,768.0],[1007.0,1741.0]],[[1329.0,1511.0],[1804.0,1895.0],[452.0,145.0],[857.0,1402.0]],[[316.0,1766.0],[1034.0,997.0],[237.0,1274.0],[385.0,1274.0]],[[604.0,1762.0],[1479.0,340.0],[1254.0,295.0],[1812.0,1958.0]],[[671.0,980.0],[4.0,121.0],[813.0,863.0],[1343.0,375.0]],[[1596.0,1680.0],[1549.0,1401.0],[1551.0,1793.0],[1153.0,1460.0]],[[779.0,573.0],[1220.0,388.0],[1996.0,1434.0],[1624.0,756.0]],[[135.0,347.0],[2016.0,245.0],[1608.0,633.0],[561.0,751.0]],[[282.0,1611.0],[791.0,1606.0],[1454.0,1696.0],[713.0,1666.0]],[[1124.0,956.0],[1535.0,33.0],[1199.0,1178.0],[1096.0,597.0]],[[843.0,1907.0],[159.0,1109.0],[470.0,359.0],[210.0,272.0]],[[2039.0,554.0],[1993.0,1892.0],[1595.0,925.0],[217.0,1700.0]],[[694.0,215.0],[1190.0,1860.0],[183.0,636.0],[781.0,852.0]],[[660.0,875.0],[517.0,77.0],[1539.0,70.0],[1659.0,1506.0]],[[1477.0,1366.0],[619.0,1319.0],[1321.0,1390.0],[240.0,1326.0]],[[1856.0,664.0],[380.0,61.0],[109.0,1996.0],[424.0,771.0]],[[1596.0,1686.0],[449.0,1074.0],[1787.0,179.0],[1880.0,886.0]],[[178.0,11.0],[1201.0,1722.0],[260.0,1371.0],[1414.0,1644.0]],[[252.0,1102.0],[539.0,838.0],[53.0,657.0],[1828.0,217.0]],[[1685.0,447.0],[133.0,689.0],[1887.0,266.0],[47.0,35.0]],[[577.0,924.0],[11.0,128.0],[962.0,1783.0],[441.0,1995.0]],[[1527.0,1367.0],[671.0,871.0],[1000.0,343.0],[891.0,676.0]],[[1233.0,379.0],[322.0,853.0],[529.0,308.0],[1842.0,1056.0]],[[1479.0,1012.0],[577.0,705.0],[979.0,1739.0],[305.0,1523.0]],[[711.0,246.0],[177.0,1143.0],[26.0,1955.0],[1704.0,786.0]],[[460.0,1444.0],[1372.0,1058.0],[674.0,1165.0],[1215.0,1996.0]],[[1327.0,1752.0],[455.0,196.0],[266.0,260.0],[1277.0,1724.0]],[[1582.0,1524.0],[1344.0,367.0],[601.0,1804.0],[1710.0,921.0]],[[1036.0,1697.0],[1377.0,1277.0],[708.0,171.0],[462.0,411.0]],[[1793.0,498.0],[1947.0,1429.0],[1128.0,489.0],[1287.0,1564.0]],[[498.0,673.0],[1836.0,363.0],[2040.0,1402.0],[508.0,1317.0]],[[400.0,404.0],[998.0,2028.0],[993.0,1990.0],[1380.0,181.0]],[[682.0,252.0],[63.0,1755.0],[1358.0,1248.0],[1007.0,1455.0]],[[598.0,289.0],[771.0,142.0],[721.0,1464.0],[1785.0,1079.0]],[[860.0,659.0],[858.0,1660.0],[758.0,716.0],[979.0,1903.0]],[[586.0,1154.0],[1327.0,659.0],[1308.0,1154.0],[986.0,799.0]],[[683.0,1154.0],[131.0,582.0],[533.0,105.0],[1787.0,213.0]],[[1434.0,1838.0],[593.0,1752.0],[884.0,642.0],[1467.0,713.0]],[[280.0,1073.0],[1521.0,1374.0],[198.0,1249.0],[637.0,1968.0]],[[212.0,1906.0],[1708.0,359.0],[74.0,33.0],[177.0,66.0]],[[118.0,881.0],[1512.0,834.0],[1845.0,181.0],[203.0,907.0]],[[1221.0,821.0],[732.0,790.0],[813.0,1521.0],[880.0,554.0]],[[409.0,1286.0],[656.0,1903.0],[2044.0,94.0],[1959.0,277.0]],[[53.0,1860.0],[1309.0,1470.0],[1416.0,1685.0],[586.0,508.0]],[[446.0,1895.0],[1332.0,681.0],[287.0,1577.0],[85.0,1818.0]],[[0.0,552.0],[1214.0,1151.0],[1244.0,244.0],[1949.0,1945.0]],[[251.0,611.0],[3.0,2036.0],[1686.0,151.0],[997.0,477.0]],[[1591.0,114.0],[1260.0,27.0],[92.0,987.0],[1577.0,1140.0]],[[1490.0,22.0],[873.0,1756.0],[874.0,1853.0],[202.0,529.0]],[[1107.0,139.0],[397.0,1623.0],[391.0,197.0],[2026.0,2006.0]],[[612.0,456.0],[2001.0,1026.0],[746.0,246.0],[443.0,1902.0]],[[293.0,750.0],[1381.0,1908.0],[643.0,1997.0],[1533.0,1053.0]],[[1218.0,1982.0],[705.0,1236.0],[119.0,722.0],[996.0,428.0]],[[1593.0,315.0],[496.0,1209.0],[404.0,1039.0],[904.0,710.0]],[[1480.0,438.0],[1841.0,407.0],[1322.0,271.0],[1828.0,1779.0]],[[357.0,458.0],[1916.0,1935.0],[1050.0,1561.0],[1905.0,1937.0]],[[1552.0,1571.0],[399.0,1540.0],[1367.0,42.0],[283.0,711.0]],[[2016.0,1763.0],[122.0,350.0],[1590.0,1352.0],[162.0,110.0]],[[3.0,1847.0],[717.0,1853.0],[1239.0,1664.0],[316.0,837.0]],[[1749.0,1303.0],[2015.0,1759.0],[1603.0,126.0],[418.0,700.0]],[[1659.0,634.0],[1043.0,881.0],[2026.0,563.0],[1407.0,422.0]],[[647.0,2018.0],[79.0,1274.0],[154.0,399.0],[1102.0,2018.0]],[[643.0,1683.0],[1029.0,1441.0],[1206.0,1326.0],[1037.0,760.0]],[[876.0,445.0],[640.0,1032.0],[495.0,828.0],[181.0,562.0]],[[1857.0,471.0],[1012.0,727.0],[1710.0,1727.0],[679.0,163.0]],[[1344.0,51.0],[1313.0,697.0],[604.0,1509.0],[1011.0,172.0]],[[1715.0,640.0],[1337.0,877.0],[997.0,1970.0],[1153.0,1105.0]],[[1975.0,916.0],[663.0,269.0],[1021.0,1862.0],[568.0,1540.0]],[[688.0,84.0],[385.0,233.0],[139.0,225.0],[2040.0,1901.0]],[[99.0,2016.0],[1074.0,1160.0],[1129.0,1561.0],[1960.0,487.0]],[[359.0,1272.0],[1545.0,1783.0],[806.0,963.0],[629.0,282.0]],[[1184.0,845.0],[414.0,1432.0],[1102.0,560.0],[905.0,1466.0]],[[1439.0,652.0],[424.0,429.0],[805.0,1243.0],[964.0,268.0]],[[168.0,1361.0],[1545.0,874.0],[1495.0,314.0],[1880.0,1915.0]],[[1359.0,1198.0],[1361.0,78.0],[352.0,527.0],[677.0,82.0]],[[108.0,1015.0],[836.0,1769.0],[1268.0,758.0],[437.0,1538.0]],[[36.0,807.0],[273.0,894.0],[654.0,1282.0],[834.0,1297.0]],[[938.0,1073.0],[1422.0,1605.0],[1300.0,200.0],[1864.0,819.0]],[[449.0,1889.0],[636.0,1596.0],[1544.0,849.0],[1285.0,1389.0]],[[975.0,2030.0],[1912.0,1633.0],[17.0,1908.0],[1440.0,1971.0]],[[1381.0,224.0],[1813.0,1607.0],[1948.0,1998.0],[1178.0,246.0]],[[1894.0,949.0],[383.0,1239.0],[667.0,1847.0],[864.0,1095.0]],[[666.0,1239.0],[1606.0,27.0],[771.0,1966.0],[56.0,1199.0]],[[1087.0,1063.0],[315.0,1598.0],[190.0,157.0],[803.0,1937.0]],[[885.0,1616.0],[1325.0,1224.0],[1994.0,1049.0],[1079.0,658.0]],[[1622.0,1655.0],[2047.0,924.0],[964.0,1665.0],[1830.0,307.0]],[[1586.0,230.0],[5.0,777.0],[1442.0,807.0],[432.0,154.0]],[[1932.0,782.0],[222.0,731.0],[1293.0,175.0],[1046.0,844.0]],[[782.0,1670.0],[265.0,735.0],[1047.0,184.0],[595.0,56.0]],[[242.0,883.0],[717.0,1342.0],[573.0,706.0],[1654.0,4.0]],[[11.0,1364.0],[109.0,881.0],[326.0,1974.0],[1900.0,303.0]],[[699.0,1105.0],[75.0,1695.0],[1193.0,820.0],[742.0,1309.0]],[[402.0,1192.0],[1242.0,820.0],[456.0,50.0],[1148.0,850.0]],[[886.0,963.0],[813.0,2041.0],[1300.0,1634.0],[1974.0,428.0]],[[1521.0,307.0],[1907.0,1033.0],[1948.0,244.0],[82.0,1361.0]],[[1959.0,43.0],[1009.0,514.0],[201.0,1616.0],[393.0,948.0]],[[216.0,1228.0],[1515.0,420.0],[394.0,1129.0],[1149.0,627.0]],[[964.0,639.0],[1955.0,228.0],[1686.0,1802.0],[123.0,50.0]],[[1356.0,1779.0],[1221.0,1998.0],[211.0,1807.0],[1303.0,1740.0]],[[104.0,690.0],[1150.0,1485.0],[985.0,277.0],[593.0,1308.0]],[[1618.0,1267.0],[1320.0,1503.0],[1998.0,577.0],[858.0,1704.0]],[[881.0,424.0],[332.0,703.0],[60.0,87.0],[339.0,1860.0]],[[300.0,760.0],[1470.0,709.0],[751.0,1706.0],[310.0,1892.0]],[[444.0,10.0],[1973.0,1494.0],[1653.0,589.0],[1490.0,569.0]],[[969.0,1595.0],[1337.0,773.0],[408.0,1264.0],[1803.0,846.0]],[[1859.0,622.0],[1049.0,219.0],[669.0,804.0],[2011.0,807.0]],[[174.0,1636.0],[1411.0,1956.0],[1701.0,906.0],[796.0,329.0]],[[63.0,637.0],[2027.0,883.0],[2035.0,1101.0],[1612.0,506.0]],[[286.0,401.0],[1420.0,690.0],[814.0,1751.0],[1268.0,1676.0]],[[1055.0,1004.0],[1544.0,1670.0],[139.0,163.0],[788.0,1524.0]],[[1661.0,1318.0],[1678.0,1132.0],[1851.0,1604.0],[719.0,527.0]],[[1762.0,1430.0],[1498.0,1528.0],[1781.0,140.0],[1507.0,506.0]],[[1368.0,219.0],[871.0,1467.0],[732.0,1173.0],[2044.0,712.0]],[[1732.0,1509.0],[1520.0,124.0],[682.0,749.0],[1470.0,1925.0]],[[1827.0,786.0],[501.0,1314.0],[67.0,1755.0],[911.0,1798.0]],[[1264.0,1721.0],[1129.0,325.0],[813.0,1854.0],[457.0,156.0]],[[19.0,918.0],[981.0,130.0],[2041.0,1358.0],[838.0,780.0]],[[455.0,116.0],[1226.0,1149.0],[387.0,546.0],[1518.0,1843.0]],[[1735.0,1348.0],[254.0,1244.0],[343.0,1899.0],[911.0,652.0]],[[859.0,1198.0],[1924.0,1174.0],[1148.0,405.0],[1039.0,660.0]],[[727.0,681.0],[1757.0,1236.0],[1626.0,1630.0],[949.0,686.0]],[[1687.0,702.0],[1352.0,999.0],[891.0,609.0],[1178.0,306.0]],[[308.0,980.0],[472.0,1248.0],[43.0,540.0],[1662.0,1620.0]],[[230.0,510.0],[215.0,539.0],[1906.0,1617.0],[1196.0,976.0]],[[651.0,1927.0],[958.0,922.0],[1029.0,1711.0],[1886.0,1152.0]],[[541.0,528.0],[132.0,535.0],[630.0,38.0],[1035.0,712.0]],[[140.0,1420.0],[1969.0,763.0],[949.0,1332.0],[755.0,864.0]],[[706.0,2019.0],[1013.0,513.0],[855.0,191.0],[1370.0,1010.0]],[[1656.0,1872.0],[1085.0,746.0],[479.0,180.0],[356.0,148.0]],[[1172.0,2040.0],[206.0,492.0],[1278.0,1519.0],[1416.0,979.0]],[[867.0,1050.0],[778.0,664.0],[1391.0,1142.0],[1323.0,1484.0]],[[151.0,319.0],[873.0,710.0],[1613.0,1875.0],[859.0,50.0]],[[1897.0,1624.0],[1548.0,1427.0],[1519.0,2017.0],[34.0,1033.0]],[[316.0,238.0],[1656.0,1666.0],[1530.0,1642.0],[757.0,1247.0]],[[800.0,367.0],[1244.0,121.0],[1739.0,158.0],[1875.0,23.0]],[[1653.0,831.0],[1949.0,1049.0],[97.0,857.0],[914.0,569.0]],[[1357.0,980.0],[1078.0,1356.0],[146.0,1577.0],[1187.0,71.0]],[[1916.0,105.0],[1741.0,64.0],[447.0,709.0],[1016.0,76.0]],[[1657.0,1822.0],[629.0,315.0],[879.0,782.0],[1707.0,1466.0]],[[1504.0,256.0],[902.0,804.0],[385.0,522.0],[1133.0,1420.0]],[[1341.0,1738.0],[1080.0,1689.0],[1455.0,933.0],[306.0,1861.0]],[[896.0,1132.0],[42.0,1304.0],[774.0,1471.0],[1246.0,1532.0]],[[807.0,1437.0],[1321.0,1097.0],[1666.0,367.0],[1544.0,780.0]],[[1838.0,806.0],[886.0,1333.0],[1962.0,1799.0],[20.0,197.0]],[[1227.0,517.0],[1594.0,290.0],[1202.0,525.0],[1321.0,1319.0]],[[1581.0,1948.0],[598.0,1052.0],[900.0,1009.0],[1544.0,1509.0]],[[204.0,1234.0],[1896.0,1409.0],[21.0,611.0],[1950.0,2040.0]],[[78.0,133.0],[1601.0,1784.0],[440.0,839.0],[1740.0,1523.0]],[[1764.0,1845.0],[1574.0,1740.0],[257.0,2044.0],[747.0,876.0]],[[761.0,408.0],[1739.0,1479.0],[900.0,736.0],[1577.0,1455.0]],[[1515.0,578.0],[652.0,956.0],[1051.0,1013.0],[292.0,324.0]],[[829.0,1789.0],[2015.0,156.0],[1316.0,901.0],[307.0,1759.0]],[[345.0,1307.0],[746.0,1956.0],[965.0,1449.0],[815.0,1160.0]],[[685.0,1855.0],[460.0,115.0],[418.0,1039.0],[1250.0,423.0]],[[1163.0,829.0],[1895.0,920.0],[116.0,1701.0],[303.0,1392.0]],[[1906.0,1850.0],[1850.0,915.0],[1771.0,1131.0],[1554.0,356.0]],[[1635.0,1624.0],[409.0,427.0],[1493.0,1446.0],[1438.0,1622.0]],[[1952.0,1994.0],[843.0,882.0],[577.0,847.0],[474.0,56.0]],[[754.0,1994.0],[1407.0,1031.0],[1273.0,366.0],[860.0,577.0]],[[1035.0,976.0],[392.0,1224.0],[1705.0,1318.0],[1460.0,635.0]],[[1880.0,932.0],[1281.0,849.0],[1346.0,525.0],[563.0,1618.0]],[[1154.0,151.0],[120.0,140.0],[1666.0,1503.0],[174.0,1889.0]],[[1866.0,1212.0],[1635.0,1655.0],[1353.0,1037.0],[1994.0,327.0]],[[82.0,612.0],[1294.0,264.0],[1474.0,223.0],[248.0,1570.0]],[[1318.0,884.0],[568.0,1755.0],[957.0,1160.0],[1395.0,19.0]],[[921.0,871.0],[1085.0,1656.0],[1231.0,1927.0],[1660.0,1997.0]],[[1909.0,1080.0],[69.0,1910.0],[1836.0,1863.0],[1744.0,892.0]],[[1499.0,1791.0],[696.0,714.0],[1872.0,1449.0],[94.0,881.0]],[[454.0,1530.0],[164.0,1837.0],[266.0,1332.0],[397.0,372.0]],[[1496.0,936.0],[371.0,1362.0],[528.0,996.0],[1439.0,960.0]],[[1095.0,1004.0],[1600.0,149.0],[59.0,1065.0],[1147.0,2041.0]],[[476.0,1992.0],[1687.0,1146.0],[396.0,252.0],[1408.0,1998.0]],[[1504.0,1082.0],[821.0,1755.0],[1567.0,695.0],[1510.0,286.0]],[[1823.0,1154.0],[1924.0,1508.0],[827.0,1351.0],[1575.0,1511.0]],[[697.0,1823.0],[1483.0,1026.0],[523.0,906.0],[653.0,1361.0]],[[9.0,508.0],[568.0,823.0],[538.0,204.0],[1564.0,575.0]],[[530.0,1391.0],[1935.0,1903.0],[393.0,64.0],[1592.0,599.0]],[[1552.0,353.0],[546.0,349.0],[1065.0,1214.0],[619.0,1367.0]],[[411.0,1814.0],[350.0,50.0],[791.0,1473.0],[1799.0,468.0]],[[773.0,70.0],[100.0,427.0],[1248.0,87.0],[1707.0,706.0]],[[1071.0,720.0],[191.0,94.0],[774.0,770.0],[708.0,495.0]],[[1472.0,197.0],[1264.0,452.0],[685.0,886.0],[0.0,206.0]],[[956.0,702.0],[1727.0,958.0],[578.0,20.0],[1913.0,2014.0]],[[129.0,604.0],[2041.0,1044.0],[1902.0,1457.0],[1385.0,1897.0]],[[1705.0,967.0],[1528.0,1908.0],[1963.0,2024.0],[26.0,768.0]],[[1361.0,784.0],[409.0,1371.0],[1909.0,184.0],[764.0,1070.0]],[[995.0,1834.0],[1771.0,524.0],[704.0,162.0],[1281.0,1979.0]],[[1220.0,1043.0],[1136.0,1543.0],[1002.0,917.0],[1406.0,1263.0]],[[1132.0,1305.0],[1559.0,1070.0],[995.0,340.0],[2031.0,678.0]],[[1526.0,652.0],[334.0,1809.0],[1953.0,1491.0],[1301.0,306.0]],[[885.0,909.0],[599.0,1454.0],[1404.0,702.0],[679.0,784.0]],[[837.0,845.0],[129.0,1698.0],[770.0,1882.0],[1680.0,1355.0]],[[118.0,1293.0],[733.0,516.0],[947.0,1713.0],[1994.0,709.0]],[[484.0,510.0],[401.0,65.0],[1908.0,730.0],[342.0,361.0]],[[572.0,52.0],[1671.0,1138.0],[780.0,1414.0],[1796.0,2002.0]],[[1898.0,2022.0],[1915.0,1071.0],[418.0,1378.0],[1394.0,260.0]],[[1870.0,1588.0],[1148.0,1615.0],[1358.0,278.0],[1238.0,560.0]],[[1063.0,81.0],[601.0,738.0],[767.0,1566.0],[511.0,1013.0]],[[1653.0,699.0],[1195.0,1417.0],[525.0,1630.0],[471.0,1557.0]],[[1484.0,935.0],[53.0,417.0],[870.0,1562.0],[320.0,119.0]],[[1503.0,1451.0],[1582.0,476.0],[567.0,678.0],[888.0,859.0]],[[1907.0,901.0],[742.0,1889.0],[1054.0,1982.0],[920.0,1603.0]],[[77.0,50.0],[507.0,711.0],[206.0,958.0],[1304.0,1292.0]],[[437.0,1710.0],[1935.0,568.0],[162.0,1116.0],[1463.0,859.0]],[[1404.0,2031.0],[560.0,1158.0],[1190.0,91.0],[1488.0,2027.0]]]cu2qu-1.3.0/tests/data/quadratic/000077500000000000000000000000001317615261400166105ustar00rootroot00000000000000cu2qu-1.3.0/tests/data/quadratic/A_.glif000066400000000000000000000054561317615261400200040ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/quadratic/E_acute.glif000066400000000000000000000046011317615261400210210ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/quadratic/a.glif000066400000000000000000000061761317615261400177050ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/quadratic/acute.glif000077500000000000000000000005161317615261400205610ustar00rootroot00000000000000 cu2qu-1.3.0/tests/data/quadratic/contents.plist000066400000000000000000000005651317615261400215300ustar00rootroot00000000000000 A A_.glif Eacute E_acute.glif a a.glif acute acute.glif cu2qu-1.3.0/tests/pens_test.py000066400000000000000000000274351317615261400163130ustar00rootroot00000000000000from __future__ import print_function, division, absolute_import import unittest from cu2qu.pens import Cu2QuPen, Cu2QuPointPen from . import CUBIC_GLYPHS, QUAD_GLYPHS from .utils import DummyGlyph, DummyPointGlyph from .utils import DummyPen, DummyPointPen from fontTools.misc.loggingTools import CapturingLogHandler import logging MAX_ERR = 1.0 class _TestPenMixin(object): """Collection of tests that are shared by both the SegmentPen and the PointPen test cases, plus some helper methods. """ def diff(self, expected, actual): import difflib expected = str(self.Glyph(expected)).splitlines(True) actual = str(self.Glyph(actual)).splitlines(True) diff = difflib.unified_diff( expected, actual, fromfile='expected', tofile='actual') return "".join(diff) def convert_glyph(self, glyph, **kwargs): # draw source glyph onto a new glyph using a Cu2Qu pen and return it converted = self.Glyph() pen = getattr(converted, self.pen_getter_name)() quadpen = self.Cu2QuPen(pen, MAX_ERR, **kwargs) getattr(glyph, self.draw_method_name)(quadpen) return converted def expect_glyph(self, source, expected): converted = self.convert_glyph(source) self.assertNotEqual(converted, source) if converted != expected: print(self.diff(expected, converted)) self.fail("converted glyph is different from expected") def test_convert_simple_glyph(self): self.expect_glyph(CUBIC_GLYPHS['a'], QUAD_GLYPHS['a']) self.expect_glyph(CUBIC_GLYPHS['A'], QUAD_GLYPHS['A']) def test_convert_composite_glyph(self): source = CUBIC_GLYPHS['Aacute'] converted = self.convert_glyph(source) # components don't change after quadratic conversion self.assertEqual(converted, source) def test_convert_mixed_glyph(self): # this contains a mix of contours and components self.expect_glyph(CUBIC_GLYPHS['Eacute'], QUAD_GLYPHS['Eacute']) def test_reverse_direction(self): for name in ('a', 'A', 'Eacute'): source = CUBIC_GLYPHS[name] normal_glyph = self.convert_glyph(source) reversed_glyph = self.convert_glyph(source, reverse_direction=True) # the number of commands is the same, just their order is iverted self.assertTrue( len(normal_glyph.outline), len(reversed_glyph.outline)) self.assertNotEqual(normal_glyph, reversed_glyph) def test_stats(self): stats = {} for name in CUBIC_GLYPHS.keys(): source = CUBIC_GLYPHS[name] self.convert_glyph(source, stats=stats) self.assertTrue(stats) self.assertTrue('1' in stats) self.assertEqual(type(stats['1']), int) def test_addComponent(self): pen = self.Pen() quadpen = self.Cu2QuPen(pen, MAX_ERR) quadpen.addComponent("a", (1, 2, 3, 4, 5.0, 6.0)) # components are passed through without changes self.assertEqual(str(pen).splitlines(), [ "pen.addComponent('a', (1, 2, 3, 4, 5.0, 6.0))", ]) class TestCu2QuPen(unittest.TestCase, _TestPenMixin): def __init__(self, *args, **kwargs): super(TestCu2QuPen, self).__init__(*args, **kwargs) self.Glyph = DummyGlyph self.Pen = DummyPen self.Cu2QuPen = Cu2QuPen self.pen_getter_name = 'getPen' self.draw_method_name = 'draw' def test__check_contour_is_open(self): msg = "moveTo is required" quadpen = Cu2QuPen(DummyPen(), MAX_ERR) with self.assertRaisesRegex(AssertionError, msg): quadpen.lineTo((0, 0)) with self.assertRaisesRegex(AssertionError, msg): quadpen.qCurveTo((0, 0), (1, 1)) with self.assertRaisesRegex(AssertionError, msg): quadpen.curveTo((0, 0), (1, 1), (2, 2)) with self.assertRaisesRegex(AssertionError, msg): quadpen.closePath() with self.assertRaisesRegex(AssertionError, msg): quadpen.endPath() quadpen.moveTo((0, 0)) # now it works quadpen.lineTo((1, 1)) quadpen.qCurveTo((2, 2), (3, 3)) quadpen.curveTo((4, 4), (5, 5), (6, 6)) quadpen.closePath() def test__check_contour_closed(self): msg = "closePath or endPath is required" quadpen = Cu2QuPen(DummyPen(), MAX_ERR) quadpen.moveTo((0, 0)) with self.assertRaisesRegex(AssertionError, msg): quadpen.moveTo((1, 1)) with self.assertRaisesRegex(AssertionError, msg): quadpen.addComponent("a", (1, 0, 0, 1, 0, 0)) # it works if contour is closed quadpen.closePath() quadpen.moveTo((1, 1)) quadpen.endPath() quadpen.addComponent("a", (1, 0, 0, 1, 0, 0)) def test_qCurveTo_no_points(self): quadpen = Cu2QuPen(DummyPen(), MAX_ERR) quadpen.moveTo((0, 0)) with self.assertRaisesRegex( AssertionError, "illegal qcurve segment point count: 0"): quadpen.qCurveTo() def test_qCurveTo_1_point(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.qCurveTo((1, 1)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.lineTo((1, 1))", ]) def test_qCurveTo_more_than_1_point(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.qCurveTo((1, 1), (2, 2)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.qCurveTo((1, 1), (2, 2))", ]) def test_curveTo_no_points(self): quadpen = Cu2QuPen(DummyPen(), MAX_ERR) quadpen.moveTo((0, 0)) with self.assertRaisesRegex( AssertionError, "illegal curve segment point count: 0"): quadpen.curveTo() def test_curveTo_1_point(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.curveTo((1, 1)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.lineTo((1, 1))", ]) def test_curveTo_2_points(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.curveTo((1, 1), (2, 2)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.qCurveTo((1, 1), (2, 2))", ]) def test_curveTo_3_points(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.curveTo((1, 1), (2, 2), (3, 3)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.qCurveTo((0.75, 0.75), (2.25, 2.25), (3, 3))", ]) def test_curveTo_more_than_3_points(self): # a 'SuperBezier' as described in fontTools.basePen.AbstractPen pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.moveTo((0, 0)) quadpen.curveTo((1, 1), (2, 2), (3, 3), (4, 4)) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.qCurveTo((0.75, 0.75), (1.625, 1.625), (2, 2))", "pen.qCurveTo((2.375, 2.375), (3.25, 3.25), (4, 4))", ]) def test_addComponent(self): pen = DummyPen() quadpen = Cu2QuPen(pen, MAX_ERR) quadpen.addComponent("a", (1, 2, 3, 4, 5.0, 6.0)) # components are passed through without changes self.assertEqual(str(pen).splitlines(), [ "pen.addComponent('a', (1, 2, 3, 4, 5.0, 6.0))", ]) def test_ignore_single_points(self): pen = DummyPen() try: logging.captureWarnings(True) with CapturingLogHandler("py.warnings", level="WARNING") as log: quadpen = Cu2QuPen(pen, MAX_ERR, ignore_single_points=True) finally: logging.captureWarnings(False) quadpen.moveTo((0, 0)) quadpen.endPath() quadpen.moveTo((1, 1)) quadpen.closePath() self.assertGreaterEqual(len(log.records), 1) self.assertIn("ignore_single_points is deprecated", log.records[0].args[0]) # single-point contours were ignored, so the pen commands are empty self.assertFalse(pen.commands) # redraw without ignoring single points quadpen.ignore_single_points = False quadpen.moveTo((0, 0)) quadpen.endPath() quadpen.moveTo((1, 1)) quadpen.closePath() self.assertTrue(pen.commands) self.assertEqual(str(pen).splitlines(), [ "pen.moveTo((0, 0))", "pen.endPath()", "pen.moveTo((1, 1))", "pen.closePath()" ]) class TestCu2QuPointPen(unittest.TestCase, _TestPenMixin): def __init__(self, *args, **kwargs): super(TestCu2QuPointPen, self).__init__(*args, **kwargs) self.Glyph = DummyPointGlyph self.Pen = DummyPointPen self.Cu2QuPen = Cu2QuPointPen self.pen_getter_name = 'getPointPen' self.draw_method_name = 'drawPoints' def test_super_bezier_curve(self): pen = DummyPointPen() quadpen = Cu2QuPointPen(pen, MAX_ERR) quadpen.beginPath() quadpen.addPoint((0, 0), segmentType="move") quadpen.addPoint((1, 1)) quadpen.addPoint((2, 2)) quadpen.addPoint((3, 3)) quadpen.addPoint( (4, 4), segmentType="curve", smooth=False, name="up", selected=1) quadpen.endPath() self.assertEqual(str(pen).splitlines(), """\ pen.beginPath() pen.addPoint((0, 0), name=None, segmentType='move', smooth=False) pen.addPoint((0.75, 0.75), name=None, segmentType=None, smooth=False) pen.addPoint((1.625, 1.625), name=None, segmentType=None, smooth=False) pen.addPoint((2, 2), name=None, segmentType='qcurve', smooth=True) pen.addPoint((2.375, 2.375), name=None, segmentType=None, smooth=False) pen.addPoint((3.25, 3.25), name=None, segmentType=None, smooth=False) pen.addPoint((4, 4), name='up', segmentType='qcurve', selected=1, smooth=False) pen.endPath()""".splitlines()) def test__flushContour_restore_starting_point(self): pen = DummyPointPen() quadpen = Cu2QuPointPen(pen, MAX_ERR) # collect the output of _flushContour before it's sent to _drawPoints new_segments = [] def _drawPoints(segments): new_segments.extend(segments) Cu2QuPointPen._drawPoints(quadpen, segments) quadpen._drawPoints = _drawPoints # a closed path (ie. no "move" segmentType) quadpen._flushContour([ ("curve", [ ((2, 2), False, None, {}), ((1, 1), False, None, {}), ((0, 0), False, None, {}), ]), ("curve", [ ((1, 1), False, None, {}), ((2, 2), False, None, {}), ((3, 3), False, None, {}), ]), ]) # the original starting point is restored: the last segment has become # the first self.assertEqual(new_segments[0][1][-1][0], (3, 3)) self.assertEqual(new_segments[-1][1][-1][0], (0, 0)) new_segments = [] # an open path (ie. starting with "move") quadpen._flushContour([ ("move", [ ((0, 0), False, None, {}), ]), ("curve", [ ((1, 1), False, None, {}), ((2, 2), False, None, {}), ((3, 3), False, None, {}), ]), ]) # the segment order stays the same before and after _flushContour self.assertEqual(new_segments[0][1][-1][0], (0, 0)) self.assertEqual(new_segments[-1][1][-1][0], (3, 3)) if __name__ == "__main__": unittest.main() cu2qu-1.3.0/tests/ufo_test.py000066400000000000000000000136041317615261400161300ustar00rootroot00000000000000from __future__ import print_function, division, absolute_import import os from fontTools.misc.loggingTools import CapturingLogHandler from defcon import Font, Glyph from cu2qu.ufo import ( fonts_to_quadratic, font_to_quadratic, glyphs_to_quadratic, glyph_to_quadratic, logger, IncompatibleGlyphsError ) from . import DATADIR import pytest TEST_UFOS = [ os.path.join(DATADIR, "RobotoSubset-Regular.ufo"), os.path.join(DATADIR, "RobotoSubset-Bold.ufo"), ] @pytest.fixture def fonts(): return [Font(ufo) for ufo in TEST_UFOS] class FontsToQuadraticTest(object): def test_modified(self, fonts): modified = fonts_to_quadratic(fonts) assert modified def test_stats(self, fonts): stats = {} fonts_to_quadratic(fonts, stats=stats) assert stats == {'1': 1, '2': 79, '3': 130, '4': 2} def test_dump_stats(self, fonts): with CapturingLogHandler(logger, "INFO") as captor: fonts_to_quadratic(fonts, dump_stats=True) assert captor.assertRegex("New spline lengths:") def test_different_glyphsets(self, fonts): del fonts[0]['a'] assert 'a' not in fonts[0] assert 'a' in fonts[1] assert fonts_to_quadratic(fonts) def test_max_err_em_float(self, fonts): stats = {} fonts_to_quadratic(fonts, max_err_em=0.002, stats=stats) assert stats == {'1': 5, '2': 193, '3': 14} def test_max_err_em_list(self, fonts): stats = {} fonts_to_quadratic(fonts, max_err_em=[0.002, 0.002], stats=stats) assert stats == {'1': 5, '2': 193, '3': 14} def test_max_err_float(self, fonts): stats = {} fonts_to_quadratic(fonts, max_err=4.096, stats=stats) assert stats == {'1': 5, '2': 193, '3': 14} def test_max_err_list(self, fonts): stats = {} fonts_to_quadratic(fonts, max_err=[4.096, 4.096], stats=stats) assert stats == {'1': 5, '2': 193, '3': 14} def test_both_max_err_and_max_err_em(self, fonts): with pytest.raises(TypeError, match="Only one .* can be specified"): fonts_to_quadratic(fonts, max_err=1.000, max_err_em=0.001) def test_single_font(self, fonts): assert font_to_quadratic(fonts[0], max_err_em=0.002, reverse_direction=True) class GlyphsToQuadraticTest(object): @pytest.mark.parametrize( ["glyph", "expected"], [('A', False), # contains no curves, it is not modified ('a', True)], ids=['lines-only', 'has-curves'] ) def test_modified(self, fonts, glyph, expected): glyphs = [f[glyph] for f in fonts] assert glyphs_to_quadratic(glyphs) == expected def test_stats(self, fonts): stats = {} glyphs_to_quadratic([f['a'] for f in fonts], stats=stats) assert stats == {'2': 1, '3': 7, '4': 3, '5': 1} def test_max_err_float(self, fonts): glyphs = [f['a'] for f in fonts] stats = {} glyphs_to_quadratic(glyphs, max_err=4.096, stats=stats) assert stats == {'2': 11, '3': 1} def test_max_err_list(self, fonts): glyphs = [f['a'] for f in fonts] stats = {} glyphs_to_quadratic(glyphs, max_err=[4.096, 4.096], stats=stats) assert stats == {'2': 11, '3': 1} def test_reverse_direction(self, fonts): glyphs = [f['A'] for f in fonts] assert glyphs_to_quadratic(glyphs, reverse_direction=True) def test_single_glyph(self, fonts): assert glyph_to_quadratic(fonts[0]['a'], max_err=4.096, reverse_direction=True) @pytest.mark.parametrize( "outlines", [ [ [ ('moveTo', ((0, 0),)), ('curveTo', ((1, 1), (2, 2), (3, 3))), ('curveTo', ((4, 4), (5, 5), (6, 6))), ('closePath', ()), ], [ ('moveTo', ((7, 7),)), ('curveTo', ((8, 8), (9, 9), (10, 10))), ('closePath', ()), ] ], [ [ ('moveTo', ((0, 0),)), ('curveTo', ((1, 1), (2, 2), (3, 3))), ('closePath', ()), ], [ ('moveTo', ((4, 4),)), ('lineTo', ((5, 5),)), ('closePath', ()), ], ] ], ids=[ "unequal-length", "different-segment-types", ] ) def test_incompatible(self, outlines): glyphs = [] for i, outline in enumerate(outlines): glyph = Glyph() glyph.name = "glyph%d" % i pen = glyph.getPen() for operator, args in outline: getattr(pen, operator)(*args) glyphs.append(glyph) with pytest.raises(IncompatibleGlyphsError) as excinfo: glyphs_to_quadratic(glyphs) assert excinfo.match("^'glyph[0-9]+'(, 'glyph[0-9]+')*$") def test_already_quadratic(self): glyph = Glyph() pen = glyph.getPen() pen.moveTo((0, 0)) pen.qCurveTo((1, 1), (2, 2)) pen.closePath() assert not glyph_to_quadratic(glyph) def test_open_paths(self): glyph = Glyph() pen = glyph.getPen() pen.moveTo((0, 0)) pen.lineTo((1, 1)) pen.curveTo((2, 2), (3, 3), (4, 4)) pen.endPath() assert glyph_to_quadratic(glyph) # open contour is still open assert glyph[-1][0].segmentType == "move" def test_ignore_components(self): glyph = Glyph() pen = glyph.getPen() pen.addComponent('a', (1, 0, 0, 1, 0, 0)) pen.moveTo((0, 0)) pen.curveTo((1, 1), (2, 2), (3, 3)) pen.closePath() assert glyph_to_quadratic(glyph) assert len(glyph.components) == 1 cu2qu-1.3.0/tests/utils.py000066400000000000000000000170011317615261400154330ustar00rootroot00000000000000from __future__ import print_function, division, absolute_import from . import CUBIC_GLYPHS from ufoLib.pointPen import PointToSegmentPen, SegmentToPointPen import unittest class BaseDummyPen(object): """Base class for pens that record the commands they are called with.""" def __init__(self, *args, **kwargs): self.commands = [] def __str__(self): """Return the pen commands as a string of python code.""" return _repr_pen_commands(self.commands) def addComponent(self, glyphName, transformation, **kwargs): self.commands.append(('addComponent', (glyphName, transformation), kwargs)) class DummyPen(BaseDummyPen): """A SegmentPen that records the commands it's called with.""" def moveTo(self, pt): self.commands.append(('moveTo', (pt,), {})) def lineTo(self, pt): self.commands.append(('lineTo', (pt,), {})) def curveTo(self, *points): self.commands.append(('curveTo', points, {})) def qCurveTo(self, *points): self.commands.append(('qCurveTo', points, {})) def closePath(self): self.commands.append(('closePath', tuple(), {})) def endPath(self): self.commands.append(('endPath', tuple(), {})) class DummyPointPen(BaseDummyPen): """A PointPen that records the commands it's called with.""" def beginPath(self, **kwargs): self.commands.append(('beginPath', tuple(), kwargs)) def endPath(self): self.commands.append(('endPath', tuple(), {})) def addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs): kwargs['segmentType'] = segmentType kwargs['smooth'] = smooth kwargs['name'] = name self.commands.append(('addPoint', (pt,), kwargs)) class DummyGlyph(object): """Provides a minimal interface for storing a glyph's outline data in a SegmentPen-oriented way. The glyph's outline consists in the list of SegmentPen commands required to draw it. """ # the SegmentPen class used to draw on this glyph type DrawingPen = DummyPen def __init__(self, glyph=None): """If another glyph (i.e. any object having a 'draw' method) is given, its outline data is copied to self. """ self._pen = self.DrawingPen() self.outline = self._pen.commands if glyph: self.appendGlyph(glyph) def appendGlyph(self, glyph): """Copy another glyph's outline onto self.""" glyph.draw(self._pen) def getPen(self): """Return the SegmentPen that can 'draw' on this glyph.""" return self._pen def getPointPen(self): """Return a PointPen adapter that can 'draw' on this glyph.""" return PointToSegmentPen(self._pen) def draw(self, pen): """Use another SegmentPen to replay the glyph's outline commands.""" if self.outline: for cmd, args, kwargs in self.outline: getattr(pen, cmd)(*args, **kwargs) def drawPoints(self, pointPen): """Use another PointPen to replay the glyph's outline commands, indirectly through an adapter. """ pen = SegmentToPointPen(pointPen) self.draw(pen) def __eq__(self, other): """Return True if 'other' glyph's outline is the same as self.""" if hasattr(other, 'outline'): return self.outline == other.outline elif hasattr(other, 'draw'): return self.outline == self.__class__(other).outline return NotImplemented def __ne__(self, other): """Return True if 'other' glyph's outline is different from self.""" return not (self == other) def __str__(self): """Return commands making up the glyph's outline as a string.""" return str(self._pen) class DummyPointGlyph(DummyGlyph): """Provides a minimal interface for storing a glyph's outline data in a PointPen-oriented way. The glyph's outline consists in the list of PointPen commands required to draw it. """ # the PointPen class used to draw on this glyph type DrawingPen = DummyPointPen def appendGlyph(self, glyph): """Copy another glyph's outline onto self.""" glyph.drawPoints(self._pen) def getPen(self): """Return a SegmentPen adapter that can 'draw' on this glyph.""" return SegmentToPointPen(self._pen) def getPointPen(self): """Return the PointPen that can 'draw' on this glyph.""" return self._pen def draw(self, pen): """Use another SegmentPen to replay the glyph's outline commands, indirectly through an adapter. """ pointPen = PointToSegmentPen(pen) self.drawPoints(pointPen) def drawPoints(self, pointPen): """Use another PointPen to replay the glyph's outline commands.""" if self.outline: for cmd, args, kwargs in self.outline: getattr(pointPen, cmd)(*args, **kwargs) def _repr_pen_commands(commands): """ >>> print(_repr_pen_commands([ ... ('moveTo', tuple(), {}), ... ('lineTo', ((1.0, 0.1),), {}), ... ('curveTo', ((1.0, 0.1), (2.0, 0.2), (3.0, 0.3)), {}) ... ])) pen.moveTo() pen.lineTo((1, 0.1)) pen.curveTo((1, 0.1), (2, 0.2), (3, 0.3)) >>> print(_repr_pen_commands([ ... ('beginPath', tuple(), {}), ... ('addPoint', ((1.0, 0.1),), ... {"segmentType":"line", "smooth":True, "name":"test", "z":1}), ... ])) pen.beginPath() pen.addPoint((1, 0.1), name='test', segmentType='line', smooth=True, z=1) >>> print(_repr_pen_commands([ ... ('addComponent', ('A', (1, 0, 0, 1, 0, 0)), {}) ... ])) pen.addComponent('A', (1, 0, 0, 1, 0, 0)) """ s = [] for cmd, args, kwargs in commands: if args: if isinstance(args[0], tuple): # cast float to int if there're no digits after decimal point args = [tuple((int(v) if int(v) == v else v) for v in pt) for pt in args] args = ", ".join(repr(a) for a in args) if kwargs: kwargs = ", ".join("%s=%r" % (k, v) for k, v in sorted(kwargs.items())) if args and kwargs: s.append("pen.%s(%s, %s)" % (cmd, args, kwargs)) elif args: s.append("pen.%s(%s)" % (cmd, args)) elif kwargs: s.append("pen.%s(%s)" % (cmd, kwargs)) else: s.append("pen.%s()" % cmd) return "\n".join(s) class TestDummyGlyph(unittest.TestCase): def test_equal(self): # verify that the copy and the copy of the copy are equal to # the source glyph's outline, as well as to each other source = CUBIC_GLYPHS['a'] copy = DummyGlyph(source) copy2 = DummyGlyph(copy) self.assertEqual(source, copy) self.assertEqual(source, copy2) self.assertEqual(copy, copy2) # assert equality doesn't hold any more after modification copy.outline.pop() self.assertNotEqual(source, copy) self.assertNotEqual(copy, copy2) class TestDummyPointGlyph(unittest.TestCase): def test_equal(self): # same as above but using the PointPen protocol source = CUBIC_GLYPHS['a'] copy = DummyPointGlyph(source) copy2 = DummyPointGlyph(copy) self.assertEqual(source, copy) self.assertEqual(source, copy2) self.assertEqual(copy, copy2) copy.outline.pop() self.assertNotEqual(source, copy) self.assertNotEqual(copy, copy2) if __name__ == "__main__": unittest.main() cu2qu-1.3.0/tools/000077500000000000000000000000001317615261400137205ustar00rootroot00000000000000cu2qu-1.3.0/tools/benchmark.py000066400000000000000000000040541317615261400162270ustar00rootroot00000000000000# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function, division, absolute_import import random import timeit MAX_ERR = 5 SETUP_CODE = ''' from %(module)s import %(function)s from %(benchmark_module)s import %(setup_function)s args = %(setup_function)s() ''' def generate_curve(): return [ tuple(float(random.randint(0, 2048)) for coord in range(2)) for point in range(4)] def setup_curve_to_quadratic(): return generate_curve(), MAX_ERR def setup_curves_to_quadratic(): num_curves = 3 return ( [generate_curve() for curve in range(num_curves)], [MAX_ERR] * num_curves) def run_benchmark( benchmark_module, module, function, setup_suffix='', repeat=1000): setup_func = 'setup_' + function if setup_suffix: print('%s with %s:' % (function, setup_suffix), end='') setup_func += '_' + setup_suffix else: print('%s:' % function, end='') results = timeit.repeat( '%s(*args)' % function, setup=(SETUP_CODE % { 'benchmark_module': benchmark_module, 'setup_function': setup_func, 'module': module, 'function': function}), repeat=repeat, number=1) print('\tavg=%dus' % (sum(results) / len(results) * 1000000.), '\tmin=%dus' % (min(results) * 1000000.)) def main(): run_benchmark('benchmark', 'cu2qu', 'curve_to_quadratic') run_benchmark('benchmark', 'cu2qu', 'curves_to_quadratic') if __name__ == '__main__': random.seed(1) main() cu2qu-1.3.0/tools/ufo_benchmark.py000066400000000000000000000022471317615261400171020ustar00rootroot00000000000000# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function, division, absolute_import import os import random from benchmark import run_benchmark MAX_ERR_EM = 0.002 DATADIR = os.path.join( os.path.dirname(__file__), os.path.pardir, 'tests', 'data') def setup_fonts_to_quadratic_defcon(): from defcon import Font return [[Font(os.path.join(DATADIR, 'RobotoSubset-Regular.ufo'))], MAX_ERR_EM] def main(): run_benchmark( 'ufo_benchmark', 'cu2qu.ufo', 'fonts_to_quadratic', setup_suffix='defcon', repeat=10) if __name__ == '__main__': random.seed(1) main() cu2qu-1.3.0/tox.ini000066400000000000000000000007621317615261400141000ustar00rootroot00000000000000[tox] envlist = py27, py36, htmlcov [testenv] deps = -rtest-requirements.txt -rrequirements.txt commands = coverage run --parallel-mode -m pytest {posargs} [testenv:htmlcov] basepython = python3.6 deps = coverage skip_install = true commands = coverage combine coverage report coverage html [testenv:codecov] passenv = * deps = coverage codecov skip_install = true ignore_outcome = true commands = coverage combine codecov --env TRAVIS_PYTHON_VERSION