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
com.google.fonts/check/name/family_and_style_max_length is overly-strict #2179
Comments
I suggest crossposting this to the Glyphsapp forum
|
27 seems good due to the msie9 bug you discovered, and Jeff's comment on win7 installation. Minimizing the delta between ttf and cff is good to enable end user conversion between them |
@davelab6 Sorry, where/what was Jeff's comment on win7? Based on answers in the GlyphsApp forum, installation on Windows does seem to be the hardest limitation. 27 could work, though it might still be more strict than we need. Do you expect there to be cases where the nameID 4 is used for in a Looking at an example of CSS from Gfonts, the family name of nameID 1 (e.g. "Encode Sans Semi Condensed") is used in Related: we might want to start adding "Name Table Entries" as custom params to GlyphsApp sources, as described at https://glyphsapp.com/tutorials/naming. (Maybe others are already doing this). |
If anyone comes across this issue, I've made a simple Python script that can be triggered from the command line to abbreviate name IDs As an example, it will take the file
Here's the helper script: It can be run with a command like:
...where you update the script path, as well as the path you're passing in with a TTF/OTF file or a folder of TTF/OTF files. Of course, this is probably most useful when added to a build shell script, in a step following FontMake font generation. This currently works from a dictionary of style names I chose to shorten in Encode Sans, but if you have other style names, you should add them in the script:
If you try it and face any issues or make any improvements, let me know! |
Is it possible to fix this in GlyphsApp with CustomParameter values?
|
@davelab6 Kind of ... their method is the reverse of what I would expect. Per the simple naming tutorial, you do two things:
Looking at the more in-depth naming tutorial, I see that it is also possible to add a specific custom parameter For nameID 4, you must use the custom parameter
|
@felipe this is probably a pretty quick change. I say we change the limit from 20 to 27 characters, as per discussion above. 27 is still on the very strict side, but if we want to raise it later, we can circle back. |
thanks, @thundernixon |
oh! I said I would do it but ended up not doing it. I am sorry! Will try to do it now :-) |
com.google.fonts/check/name/family_and_style_max_length After discussing the problem in more detail at issue fonttools#2179 we decided that allowing up to 27 chars would still be on the safe side. Please also see issue fonttools#2447
A few things here: a) The above GitHub junk is a really good example of why we should not reference issue URLs in a report. :-) |
Small update/edit. After another test abbreviating the instance name, I can confirm:
|
Combining the information here and in #4104, I think we should make the test do the following:
|
Please note that the actual limit would be ≤ 32. And I think it should have a FAIL result if it goes up that value. |
Updated max length requirements according to feedback from @vv-monsalve and improved description of problems to inform the users. Entries longer than 32 chars now emmit a FAIL. com.google.fonts/check/name/family_and_style_max_length on Google Fonts profile (issue fonttools#2179)
Updated max length requirements according to feedback from @vv-monsalve and improved description of problems to inform the users. Entries longer than 32 chars now emmit a FAIL. com.google.fonts/check/name/family_and_style_max_length on Google Fonts profile (issue fonttools#2179)
Updated max length requirements according to feedback from @vv-monsalve and improved description of problems to inform the users. Entries longer than 32 chars now emmit a FAIL. com.google.fonts/check/name/family_and_style_max_length on Google Fonts profile (issue #2179)
Observed behaviour
com.google.fonts/check/name/family_and_style_max_length is overly strict, as far as I can tell. This will make unnecessary work for people to figure out abbreviations for font naming. The check says:
...and bases this off a GlyphsApp tutorial recommendation.
Here's the issue this was first brought up in: Issue 1488. It references this tutorial, but the tutorial doesn't substantiate its claim.
Expected behaviour
I propose three changes to the check:
nameID="4"
, rather than do a simple concatenation of family and style names (nameID="1" + nameID="2"
).nameID=6
to verify that it is a maximum of 29 characters.In this TypeDrawers thread, Mark Simonson describes how he keeps
nameID 4
to 31 or fewer characters, in order to keep it working on MS Word 2011 for Mac. For what it's worth, this is also the value I've heard from other professional type designers, but specific references are difficult to locate.In this Adobe Font Naming Issues PDF, the PostScript name (
nameID 6
) must have no spaces and be limited to 29 characters for old postscript printers (see page 8). If someone somehow had a super-long family and style name with no spaces in either, we couldn't count on spaces being removed forID 6
(e.g.Supercalifragilistic SemiBold
would becomeSupercalifragilistic-SemiBold
, and thus my recommendation of 29 characters for both IDs4
and6
.The most strict naming limitation I've been able to find a reference for anywhere is this IE9 bug, which describes that IE9 can handle only up to 31 characters in a
font-family
declaration, meaning that after possible quotes and a semicolon and/or commas, the maximum working length of a name is 27 characters. If the GFonts CSS is automatically generated usingID 4
, we could potentially limit ourselves to 27 characters instead of 29.Is there anything concrete I've missed that really specifies 20 characters being a true limit, and where in what software there are problems beyond that? If so, we can follow that limitation. However, I believe the GlyphsApp tutorial may just be throwing that low number out as an easy guidline to remember, not as a verified limitation.
Why it matters to be accurate
Especially in fonts which have widths and weights (e.g. Encode Sans), a limit of 20 characters is unecessarily difficult to achieve.
One of the font instance currently hosted on Google Fonts has a
nameID 4
ofEncode Sans Semi Condensed ExtraLight
, which is 37 characters. That would need to be abbreviated innameID 4
to show up in IE9 or in MSWord2011 for Mac. Right now, both cases are very likely failing.To shorten that to 20 characters, it has to be something very cryptic, like
EncodeSans-SmCndXLgt
. It's hard to think of what characters to take out, and the problem would only be worse for something with a longer family name. If the check is this strict, people might end up ignoring it.If we increase the limit to 29 characters, the same font could be something like
Encode Sans SemiCond ExLight
, which uses 28 characters (counting spaces) and is much more readable.If no one objects to this update, I'd be happy to try updating the Font Bakery check according to my proposal. I just wanted to document my findings and get potential feedback before editing any code.
The text was updated successfully, but these errors were encountered: