diff --git a/buildglyphs.ptl b/buildglyphs.ptl index 66bd184..76509e4 100644 --- a/buildglyphs.ptl +++ b/buildglyphs.ptl @@ -512,14 +512,15 @@ export as build : define [buildFont para recursive recursiveCodes] : begin # Note: we use 1000upm in design, and (1000 * upmsacle)upm in production, to avoid rounding error. let [asc : para.leading * CAP / (CAP - DESCENDER)] [desc : para.leading * DESCENDER / (CAP - DESCENDER)] : begin + local bottomPad : fallback para.linegap 0 set font.head.unitsPerEm 1000 set font.hhea.ascender asc set font.OS_2.usWinAscent asc set font.OS_2.sTypoAscender asc - set font.hhea.descender (DESCENDER - para.linegap) - set font.OS_2.usWinDescent ([Math.abs desc] + para.liengap) - set font.OS_2.sTypoDescender (desc - para.liengap) + set font.hhea.descender (DESCENDER - bottomPad) + set font.OS_2.usWinDescent ([Math.abs desc] + bottomPad) + set font.OS_2.sTypoDescender (desc - bottomPad) set font.hhea.lineGap (para.leading - asc + DESCENDER) set font.OS_2.sTypoLineGap (para.leading - asc + desc)