googlefonts / noto-emoji

Noto Emoji fonts
SIL Open Font License 1.1
3.71k stars 449 forks source link

Noto Emoji name not correct in Windows 10 font setting #473

Open RoachLin opened 1 month ago

RoachLin commented 1 month ago

I download Monochrome Font, and install 5 static fonts on Windows 10. I turn to Win 10 Setting-Personalize-Font, and find Noto Emoji. The name of medium and semibold are regular, as below. Snipaste_2024-06-28_00-38-14

kenmcd commented 1 month ago

This appears to be a STAT table issue. The STAT tables in the Medium and SemiBold are bad.

First, this is the Windows interface in English.

Windows-Settings-Personaization-Fonts-Noto-Emoji

I noticed the name table in all the 5 fonts only had:

So no names for Medium and SemiBold.

Below are all five STAT tables. Note how Medium and SemiBold are missing the <AxisValueArray>.

Light STAT

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=1 -->
    <AxisValueArray>
      <AxisValue index="0" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="257"/>  <!-- Light -->
        <Value value="300.0"/>
      </AxisValue>
    </AxisValueArray>
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

Regular STAT

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=1 -->
    <AxisValueArray>
      <AxisValue index="0" Format="3">
        <AxisIndex value="0"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="258"/>  <!-- Regular -->
        <Value value="400.0"/>
        <LinkedValue value="700.0"/>
      </AxisValue>
    </AxisValueArray>
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

Medium STAT

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=0 -->
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

SemiBold STAT

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=0 -->
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

Bold STAT

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=1 -->
    <AxisValueArray>
      <AxisValue index="0" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="259"/>  <!-- Bold -->
        <Value value="700.0"/>
      </AxisValue>
    </AxisValueArray>
    <ElidedFallbackNameID value="2"/>  <!-- Bold -->
  </STAT>

</ttFont>

So I assume if the STAT tables are fixed in the Medium and SemiBold that would fix this Windows issue.

kenmcd commented 1 month ago

Hmmmm... just checked the variable font. Same three names in the name table - only Light, Regular and Bold.

And the STAT table looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.53">

  <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=3 -->
    <AxisValueArray>
      <AxisValue index="0" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="257"/>  <!-- Light -->
        <Value value="300.0"/>
      </AxisValue>
      <AxisValue index="1" Format="3">
        <AxisIndex value="0"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="258"/>  <!-- Regular -->
        <Value value="400.0"/>
        <LinkedValue value="700.0"/>
      </AxisValue>
      <AxisValue index="2" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="259"/>  <!-- Bold -->
        <Value value="700.0"/>
      </AxisValue>
    </AxisValueArray>
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

No Medium or SemiBold.