You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the instance names don't seem to have any change from their typical versions.
Bug part 2: The instance names do need a space between "Weight" and "Italic" names
The --compact-style-names build flag was introduced to make names compatible with Google Fonts standards (google/fonts#1908). However, if the help text is accurate, the naming convention from --compact-style-names isn't quite accurate.
argparser.add_argument('--compact-style-names', action='store_true',
help="Produce font files with style names that doesn't contain spaces. "\
"E.g. \"SemiBoldItalic\" instead of \"Semi Bold Italic\"")
def collapseFontStyleName(font):
# collapse whitespace in style name. i.e. "Semi Bold Italic" -> "SemiBoldItalic"
font.info.styleName = re.sub(r'\s', '', font.info.styleName)
# update info to have style changes "trickle down" to other metadata
setFontInfo(font, font.info.openTypeOS2WeightClass)
Here's the output of FontBakery specifying the expected style names:
🔥 FAIL: Check variable font instances have correct names
Instance name "Extra Light" is incorrect. It should be "ExtraLight" [code: bad-name]
Instance name "Extra Light Italic" is incorrect. It should be "ExtraLight Italic" [code: bad-name]
Instance name "Semi Bold" is incorrect. It should be "SemiBold" [code: bad-name]
Instance name "Semi Bold Italic" is incorrect. It should be "SemiBold Italic" [code: bad-name]
Instance name "Extra Bold" is incorrect. It should be "ExtraBold" [code: bad-name]
Instance name "Extra Bold Italic" is incorrect. It should be "ExtraBold Italic" [code: bad-name]
This will cause problems with some of the Google Fonts systems that look up fonts by their style names. This must be fixed! [code: bad-instance-names]
Admittedly, I should have caught this detail in the Pull Request thread.
Possibly, the most straightforward way to handle this is to just find instances of Extra Light,Semi Bold, and Extra Bold in the designspace, then edit these to remove spaces. The other possibility is that it could be fixed in the ttf, with FontTools.
To Reproduce
Steps to reproduce the behavior:
run ./init.sh to set up the project
run make designspace to set up the build
run misc/fontbuild compile-var --compact-style-names -o build/fonts/var/Inter.var.ttf src/Inter.designspace to build the variable font with compact-style-names flag
Expected behavior
Instance names should be like ExtraBold Italic, not like Extra Bold Italic nor ExtraBoldItalic.
Environment
OS: macOS 10.14.5
App that renders the font [if applicable; e.g. Chrome, Adobe Illustrator]
Thanks! This, "the flipped q” and some other issues are all related to me upgrading fontmake which caused some code of the fontbuild program not to be invoked. Working on a fix now!
rsms
added
the
bug
Something that is now the way it's supposed to be
label
Oct 21, 2019
Prior to that commit I also introduced a new make target dedicated to Google fonts with the creative name “googlefonts”:
make -j googlefonts
This puts fonts into build/googlefonts with compact style names.
We can use this makefile target to add any additional things we might want for Google fonts.
Bug part 1: I can't get the
--compact-style-names
flag to workI am generating the designspace and UFO masters with:
...then building the varfont with:
However, the instance names don't seem to have any change from their typical versions.
Bug part 2: The instance names do need a space between "Weight" and "Italic" names
The
--compact-style-names
build flag was introduced to make names compatible with Google Fonts standards (google/fonts#1908). However, if the help text is accurate, the naming convention from--compact-style-names
isn't quite accurate.Here's the output of FontBakery specifying the expected style names:
Admittedly, I should have caught this detail in the Pull Request thread.
Possibly, the most straightforward way to handle this is to just find instances of
Extra Light
,Semi Bold
, andExtra Bold
in the designspace, then edit these to remove spaces. The other possibility is that it could be fixed in the ttf, with FontTools.To Reproduce
Steps to reproduce the behavior:
./init.sh
to set up the projectmake designspace
to set up the buildmisc/fontbuild compile-var --compact-style-names -o build/fonts/var/Inter.var.ttf src/Inter.designspace
to build the variable font with compact-style-names flagExpected behavior
Instance names should be like
ExtraBold Italic
, not likeExtra Bold Italic
norExtraBoldItalic
.Environment
The text was updated successfully, but these errors were encountered: