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

font handler should prefer embedded sample string if available #65

Closed
n8willis opened this issue Aug 16, 2018 · 1 comment
Closed

font handler should prefer embedded sample string if available #65

n8willis opened this issue Aug 16, 2018 · 1 comment
Labels
feature:fonts Related to font metadata

Comments

@n8willis
Copy link

It's good that the font handler tries to be smart about selecting the sample-text string that will be shown to users.

There is one option it is not currently making use of, however: in OpenType and TrueType fonts, the name table includes a field for sample strings at nameID 19. If this nameID is present in the font, it means that the designer or publisher has selected the sample string that (hopefully) best shows the relevant characteristics of the font.

It could be identical to a standard pangram, but then again it could be different. So, if present in the binary, it is preferable to an arbitrary string choice.

(The table is detailed here: https://docs.microsoft.com/en-gb/typography/opentype/spec/name#name-ids )

@ximion ximion added the feature:fonts Related to font metadata label Aug 22, 2018
@ximion ximion closed this as completed in c760aab Jan 27, 2019
@ximion
Copy link
Owner

ximion commented Jan 27, 2019

This isn't well tested yet, because I don't have a large enough set of fonts for testing.
I will do a run with the Debian archive though, to see if there are any issues.
Thanks for the issue report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:fonts Related to font metadata
Projects
None yet
Development

No branches or pull requests

2 participants