-
Notifications
You must be signed in to change notification settings - Fork 105
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
Improve unreachable subsetting check #4273
Conversation
e7d5b0a
to
4396cc0
Compare
I'm not sure why you've assigned this back to me, and assigned it a milestone. It's ready to merge. |
A bug in setuptools_scm caused this PR build to fail: pypa/setuptools-scm#905 Now that setuptools_scm version 8.0.0 was yanked, I'm re-triggering the build. |
I always do it right before merging PRs and closing issues, with the purpose of tracking history of what went into each version of the program. |
due to the bug described at pypa/setuptools-scm#905
Description
This improves the
com.google.fonts/check/metadata/unreachable_subsetting
check in a number of ways:font_codepoints
was buggy! It searched through cmap tables to find those which are platform=Windows encoding=Unicode_BMP - which is fine if your font has codepoints exclusively within the BMP! I fixed it to usettFont.getBestCmap()
, which is simpler and also allows for cmap tables containing codepoints in supplementary planes.google/fonts
, i.e. when you have a METADATA.pb file already. But it's also useful to be able to check during development (i.e. when you are upstream of google/fonts) if any codepoints will get left behind. We do this by copying the behaviour of the packager in how it detects subsets within a font, and using that information if a METADATA.pb file is not present.Checklist
CHANGELOG.md