batchRoboFontExtension
batchRoboFontExtension copied to clipboard
[ds5] Suffixes
Example path of some output:
.../_batch_generation/Variable/otf-woff/Test_Display-VF_otf.woff2
Questions:
- Should this suffix be a default in the settings:
variableFontsSuffix="-VF"
, but output without a suffix if the user removes this suffix in the settings? - Folder names:
a. Should the folder names be like
otf-woff2
to reflect the new file-type? b. Should all folder names be all-caps likeOTF WOFF2
to reflect the UI? - Should the
_otf
suffix (presumably to clarify the type of woff2) only be placed on the file name if Export in Subfolders is False?
The naming of the variable font file can be stored in the designspace. Could be something to use, if it is present in the file?
if there is no variableFonts entry in the designspace file fontTools designspaceLib makes up a name of all possible interpolable subdesignspaces see https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/designspaceLib/init.py#L3246
the "-VF" suffix starts there... Batch should already use those variableFont names if they are available
in operator it happens here https://github.com/LettError/ufoProcessor/blob/master/Lib/ufoProcessor/ufoOperator.py#L250
- will pushed soon
- yeah maybe, adding the format of the woff file (otf, ttf) suffix happens here https://github.com/typemytype/batchRoboFontExtension/blob/ds5/Batch.roboFontExt/lib/batchGenerators/batchTools.py#L283 its necessary to make a different path when both otf woff and ttf woff are exported in the same directory, Im fine with mapping the ext to
opentype
andtruetype
like the css @font-face format
for 2. see ec48490d8e91f07ea95794699b8ddee2c8da8663
Sounds good on all three items! Thanks for the push on #2.
I ran into a couple of additional file naming issues with variable fonts specifically:
-
Re: https://github.com/typemytype/batchRoboFontExtension/issues/70#issuecomment-1729679370, regardless of my choice here, the Batch generates with the
name
, notfilename
from my<variable-font>
table in the designspace file. This might be related: https://github.com/fonttools/fonttools/issues/3308 -
The suffixes set in Batch Settings for Desktop and Web seem to work, but the suffixes added in the Variable section of settings don't get applied to variable fonts.