Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Sans has outlines we don't like #349

Closed
rsheeter opened this issue Jun 28, 2023 · 2 comments · Fixed by #385
Closed

Google Sans has outlines we don't like #349

rsheeter opened this issue Jun 28, 2023 · 2 comments · Fixed by #385
Assignees

Comments

@rsheeter
Copy link
Contributor

https://github.com/googlefonts/googlesans/issues/586

@anthrotype
Copy link
Member

The offending contour is in GoogleSans-opsz18-wght380-GRAD-50.ufo/glyphs/tzaa-ethiopic.glif, here's an excerpt:

    <contour>
      <point x="109" y="720"/>
      <point x="30" y="649"/>
      <point x="30" y="521" type="curve" smooth="yes"/>
[...]
      <point x="405" y="658"/>
      <point x="346" y="720"/>
      <point x="228" y="720" type="curve" smooth="yes"/>
    </contour>

looks like we don't add an inital MoveTo when the glif contour begin with off-curves like in this case, here's the generated IR generated from the above, which is missing the initial MoveTo and causing the panic:

    contours:
    - - !CurveTo
        - x: 109.0
          y: 720.0
        - x: 30.0
          y: 649.0
        - x: 30.0
          y: 521.0
[...]
      - !CurveTo
        - x: 405.0
          y: 658.0
        - x: 346.0
          y: 720.0
        - x: 228.0
          y: 720.0

@anthrotype
Copy link
Member

when compiling in debug mode, kurbo contains debug_assert! statements that ensure that a valid BezPath always starts with a MoveTo. The OP run fontc as cargo run --release hence these were skipped, but then we panic later on in fontbe/glyphs.rs when converting curves to quadratics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants