fontist / formulas

Fontist Font Formulas
6 stars 0 forks source link

When queried on a manifest, return some font metadata (such as whether the font is variable) to allow user to make font usage decisions #182

Open Intelligent2013 opened 3 months ago

Intelligent2013 commented 3 months ago

Source issue: https://github.com/metanorma/metanorma/issues/357

Currently, the font 'Inter' (regular and bold) is using on the new ISO Cover page in PDF.

Fontist also installs the font file Inter-VariableFont_slnt,wght.ttf (https://github.com/fontist/formulas/blob/057e88b07fe41dd04f9b540fd70c1df31843eba7/Formulas/google/inter.yml#L25). The variable fonts aren't supported by Apache FOP, and causes the warning message:

WARNING: font '/config/fonts/Inter-VariableFont_slnt,wght.ttf' from the fontist manifest file is the variable font and doesn't supported by Apache FOP!

Need to remove the entry about Inter-VariableFont_slnt,wght.ttf from Inter.yml.

ronaldtse commented 3 months ago

@Intelligent2013 what would you think is the proper approach here?

Should Fontist:

  1. In the font manifest returned, differentiate variable vs non-variable fonts?
  2. Not install the Inter variable font?
  3. Allow the Fontist user to specify if they want variable fonts or not?
Intelligent2013 commented 3 months ago

@Intelligent2013 what would you think is the proper approach here?

Should Fontist:

  1. In the font manifest returned, differentiate variable vs non-variable fonts?
  2. Not install the Inter variable font?
  3. Allow the Fontist user to specify if they want variable fonts or not?

@ronaldtse I think that option 1. would be preferable. Then mn2pdf will ignore variable fonts entries (I'll update so).

ronaldtse commented 3 months ago

Agree. The Fontist manifest returned from a query should return some font metadata for the users to make decisions.