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

multiple fixes: prevent crash from nil loca, fix Height metric, cache advances, more robust to bad kern issues #62

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

rcoreilly
Copy link

These are all extensively tested in context of GoGi project: https://github.com/goki/gi and fix a number of important issues to make it work. Let me know if there are any questions on anything! Thanks,

  • Randy

Randall O'Reilly added 2 commits August 16, 2018 01:05
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@rcoreilly
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@rcoreilly
Copy link
Author

Sorry I forgot to check existing PR's and see that this is partially redundant with #32 -- seems like this package is not being actively maintained. Therefore, I'll plan to keep my fork at https://github.com/goki/freetype up-to-date if anyone wants to contribute PR's there. Without the above fixes (or #32) the font height computation is definitely incorrect, and it is not usable for browsing fonts on Linux because of the crashing. I'll merge #49 and #50 now -- will be handy for SVG!

fhs added a commit to fhs/duitdraw that referenced this pull request Mar 8, 2019
The height seems to be only slightly bigger than the Ascent.
It's small enough such that characters that take up space below the
baseline (e.g. 'g', 'y', 'j', 'p') gets cut off at the bottom.
(For reference, see
https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_metrics_2x.png)

This is a freetype bug: golang/freetype#34
There are multiple PRs with a fix that haven't been merged:
golang/freetype#32
golang/freetype#62

Plan9port's fontsrv also similarly sums up ascent and descent to compute
the height:
https://github.com/9fans/plan9port/blob/047fd921744f39a82a86d9370e03f7af511e6e84/src/cmd/fontsrv/x11.c#L80
@kkoreilly kkoreilly deleted the branch golang:master August 27, 2023 23:46
@kkoreilly kkoreilly deleted the master branch August 27, 2023 23:46
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 this pull request may close these issues.

4 participants