quiple / galmuri

Bitmap fonts inspired by the font design from Nintendo DS
https://galmuri.quiple.dev
SIL Open Font License 1.1
318 stars 4 forks source link

Table hhea.descent incorrect, should be negative but positive. #32

Closed TakWolf closed 1 year ago

TakWolf commented 1 year ago

v2.35.5

I have only check Galmuri11.ttf, dump info is following: (Hide unimportant parameters )

  <hhea>
    <ascent value="1200"/>
    <descent value="200"/>    <!-- *********This incorrect -->
    <lineGap value="200"/>
    <advanceWidthMax value="1800"/>
    <minLeftSideBearing value="-200"/>
    <minRightSideBearing value="-100"/>
  </hhea>
  <OS_2>
    <xAvgCharWidth value="1167"/>
    <usWeightClass value="400"/>
    <usWidthClass value="5"/>
    <usFirstCharIndex value="32"/>
    <usLastCharIndex value="65533"/>
    <sTypoAscender value="1200"/>
    <sTypoDescender value="-200"/>    <!-- This is correct -->
    <sTypoLineGap value="200"/>
    <usWinAscent value="1400"/>
    <usWinDescent value="200"/>         <!-- This is correct -->
    <sxHeight value="800"/>
    <sCapHeight value="1100"/>
    <usDefaultChar value="0"/>
    <usBreakChar value="32"/>
    <usMaxContext value="3"/>
  </OS_2>

Reference the article https://glyphsapp.com/learn/vertical-metrics

hhea

hheaAscender: the height of the ascenders in units
hheaDescender: the depth of the descenders in units (negative value)
hheaLineGap: the recommended whitespace between lines

OS/2 sTypo (typo)

typoAscender: the height of the ascenders in units
typoDescender: the depth of the descenders in units (negative value)
typoLineGap: the recommended whitespace between lines

OS/2 usWin (win)

winAscent: the top extremum of the font rendering box
winDescent: the bottom extremum of the font rendering box (positive value)
quiple commented 1 year ago

Thanks for pointing out! I've released files that fixes the issue.

It was caused by following AFDKO's example.