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

[tx] Bounding box not calculated correctly when start point is on right most edge of bounding box #655

Closed
benkiel opened this issue Oct 25, 2018 · 4 comments
Assignees

Comments

@benkiel
Copy link
Contributor

benkiel commented Oct 25, 2018

When looking for the answer for why comparefamily was incorrectly reporting bogus stems for a typeface, I realized that with a glyph like so:

<?xml version="1.0" encoding="UTF-8"?>
<glyph name="guilsinglright" format="1">
  <advance width="0"/>
  <outline>
    <contour>
      <point x="261" y="202" type="line"/>
      <point x="261" y="227" type="line"/>
      <point x="77" y="435" type="line"/>
      <point x="74" y="435" type="line"/>
      <point x="40" y="386" type="line"/>
      <point x="40" y="383" type="line"/>
      <point x="182" y="202" type="line"/>
      <point x="40" y="25" type="line"/>
      <point x="40" y="22" type="line"/>
      <point x="58" y="-5" type="line"/>
      <point x="61" y="-5" type="line"/>
    </contour>
  </outline>
</glyph>

the bounding box gotten by comparefamily with tx from here:

cmpfFont.metricsDict = {}
has the bounding box at 236, not 221 like it should be. This seems consistent with glyphs that have their start point on the right edge.

@miguelsousa
Copy link
Member

Thanks for the report @benkiel. I've created branch tx-glyphybboxes-bug655 containing a test case and @cjchapman will have a look at it.

@benkiel
Copy link
Contributor Author

benkiel commented Oct 26, 2018

@miguelsousa thank you!

@benkiel
Copy link
Contributor Author

benkiel commented Nov 2, 2018

Confirmed fixed, thank you @cjchapman!

@cjchapman
Copy link
Contributor

@benkiel You're welcome. Thanks for the confirmation!

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

No branches or pull requests

3 participants