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

glifparser can't handle quadratic contours containing only interpolated points #36

Open
ctrlcctrlv opened this issue Jun 7, 2022 · 0 comments
Labels
bug Something isn't working C-Quadratic Quadratic curves

Comments

@ctrlcctrlv
Copy link
Contributor

Consider this quadratic period, points displayed with FontForge semantics:

image

<?xml version="1.0"?>
<glyph name="period" format="2">
  <advance width="1000"/>
  <unicode hex="002E"/>
  <outline>
    <contour>
      <point x="134" y="35"/>
      <point x="134" y="530"/>
      <point x="612" y="530"/>
      <point x="612" y="35"/>
    </contour>
  </outline>
</glyph>

All its points are interpolated. This is valid.

But glifparser uses the existence of a qcurve to know a contour is quadratic, so we no contour in MFEKglif!

If I tell FontForge to never interpolate one point, as:

…
  <outline>
    <contour>
      <point x="373" y="35" type="qcurve" smooth="yes"/>
      <point x="134" y="35"/>
      <point x="134" y="530"/>
      <point x="612" y="530"/>
      <point x="612" y="35"/>
    </contour>
  </outline>
…

We do draw it right:

image

But if I move the first QCurve we get buggy display:

image

Because QClose doesn't get a point drawn for it. Ruh-roh.

@MatthewBlanchard's pen work is definitely needed. :)

@ctrlcctrlv ctrlcctrlv added bug Something isn't working C-Quadratic Quadratic curves labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C-Quadratic Quadratic curves
Projects
None yet
Development

No branches or pull requests

1 participant