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

add-font adds spaces to ABeeZee font name #122

Open
thundernixon opened this issue Feb 13, 2019 · 7 comments
Open

add-font adds spaces to ABeeZee font name #122

thundernixon opened this issue Feb 13, 2019 · 7 comments

Comments

@thundernixon
Copy link
Contributor

I'm using add-fonts to generate new metadata for all families in google/fonts, in order to make sure we don't exclude latin-ext glyphs where they exist (see google/fonts#187). This has led me to find a number of issues with add-font. I'll document them separately, so that we can hopefully correct things that are real issues, and I can be better informed if some of them aren't real issues.


If add-font is run on ABeeZee, the METADATA.pb file ends up with

name: "A Bee Zee"

However, in the name table of ABeeZee, nameID 1 is

    <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0" unicode="True">
      ABeeZee
    </namerecord>

(without spaces)

So, we may need to add an exception for ABeeZee, unless this is really the intended behavior.

@felipesanches
Copy link
Member

fontbakery does have exceptions for this kind of thing. Maybe we can copy the exceptions into gftools add-font as well

@thundernixon
Copy link
Contributor Author

That's pretty much what I had in mind! I thought it actually did exist in add-font, but that must have been in another tool.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Feb 14, 2019

I don't like this camelcase splitting function. I also use it in GFR. Couldn't we get the family name in the following manner?

nametable = font['name']

family_name = None
typographic_name = nametable.getName(16, 3, 1, 1033)
if typographic_name:
    family_name = typographic_name.toUnicode()
else:
    family_name = nametable.getName(1, 3, 1, 1033).toUnicode()

@m4rc1e
Copy link
Collaborator

m4rc1e commented Feb 14, 2019

The above method does depend on the fonts having good name tables though? so maybe the filename may be a better indicator of the family name. Anyone willing to test this across our collection?

@thundernixon
Copy link
Contributor Author

I think I will probably need to check name changes anyway, so I'd be happy to try this.

What is nameID 1033? I don't see it in the MS spec, and I don't recall coming across it before.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Feb 14, 2019

it's the langID of the record.

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