google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.1k stars 2.6k forks source link

[Variable Fonts] font naming/metadata proposal #1580

Open m4rc1e opened 6 years ago

m4rc1e commented 6 years ago

We've been working on two beta VF fonts MarkaziText #1565 and Vollkorn #1571. I thinks it's important we get the metadata for variable fonts established before we sign off on these.

Myself and @davelab6 have been discussing naming in #1571. The STAT table also adds another layer of complexity.

Atm I'm using fontmake's default naming. For Markazi Text #1565 we get the following nametable:

platformID    encodingID    languageID    nameID  nameString
1             0             0       256  Weight
1             0             0       257  Regular
1             0             0       258  Medium
1             0             0       259  SemiBold
1             0             0       260  Bold
3             1          1033         0  Copyright 2017 The Markazi Text Authors (https://github.com/BornaIz/markazitext)
3             1          1033         1  Markazi Text
3             1          1033         2  Regular
3             1          1033         3  1.000;NONE;MarkaziText-Regular
3             1          1033         4  Markazi Text Regular
3             1          1033         5  Version 1.000
3             1          1033         6  MarkaziText-Regular
3             1          1033         8  Borna Izadpanah and Florian Runge
3             1          1033         9  Borna Izadpanah (Arabic designer), Fiona Ross (Arabic design director) and Florian Runge (Latin designer)
3             1          1033        11  http://www.borna.design, http://www.florianrunge.com
3             1          1033        12  http://www.borna.design, http://www.florianrunge.com
3             1          1033        13  This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
3             1          1033        14  http://scripts.sil.org/OFL
3             1          1033       256  Weight
3             1          1033       257  Regular
3             1          1033       258  Medium
3             1          1033       259  SemiBold
3             1          1033       260  Bold

I've manually created the following STAT table

<STAT>
  <Version value="0x00010001"/>
  <DesignAxisRecordSize value="8"/>
  <!-- DesignAxisCount=1 -->
  <DesignAxisRecord>
    <Axis index="0">
      <AxisTag value="wght"/>
      <AxisNameID value="256"/>  <!-- Weight -->
      <AxisOrdering value="0"/>
    </Axis>
  </DesignAxisRecord>
  <!-- AxisValueCount=4 -->
  <AxisValueArray>
    <AxisValue index="0" Format="1">
      <AxisIndex value="0"/>
      <Flags value="0"/>
      <ValueNameID value="257"/>  <!-- Regular -->
      <Value value="160.0"/>
    </AxisValue>
    <AxisValue index="1" Format="1">
      <AxisIndex value="0"/>
      <Flags value="0"/>
      <ValueNameID value="258"/>  <!-- Medium -->
      <Value value="182.0"/>
    </AxisValue>
    <AxisValue index="2" Format="1">
      <AxisIndex value="0"/>
      <Flags value="0"/>
      <ValueNameID value="259"/>  <!-- SemiBold -->
      <Value value="210.0"/>
    </AxisValue>
    <AxisValue index="3" Format="1">
      <AxisIndex value="0"/>
      <Flags value="0"/>
      <ValueNameID value="260"/>  <!-- Bold -->
      <Value value="232.0"/>
    </AxisValue>
  </AxisValueArray>
  <ElidedFallbackNameID value="257"/>  <!-- Regular -->
</STAT>

This gives us the following font menus in Desktop applications

screen shot 2018-05-30 at 09 42 28

Finally, for filenames we will distinguish between Roman and Italic VF fonts. When Markazi moves out of Beta its filename will be:

MarkaziText-Roman-VF.ttf

Note: 'Roman' and 'VF' will not be added to the names inside the fonts.

When a family includes Italics as a separate VF font, the filenames will be the following:

Vollkorn-Roman-VF.ttf Vollkorn-Italic-VF.ttf

We want to end up with the following font menu.

screen shot 2018-05-29 at 19 35 15

When we're happy with this proposal, our next step is to write a Font Bakery test.

laerm0 commented 5 years ago

Maybe add a new proposals/documentation/etc milestone, @davelab6 ?

laerm0 commented 4 years ago

@m4rc1e We're practically good on this now, aye?