fixes
This commit is contained in:
parent
6a618b9e6b
commit
05889d51e4
2 changed files with 5 additions and 1 deletions
|
@ -1479,6 +1479,10 @@ proc getAdvance*(opentype: OpenType, rune: Rune): float32 =
|
||||||
result = opentype.hmtx.hMetrics[^1].advanceWidth.float32
|
result = opentype.hmtx.hMetrics[^1].advanceWidth.float32
|
||||||
|
|
||||||
proc getKerningAdjustment*(opentype: OpenType, left, right: Rune): float32 =
|
proc getKerningAdjustment*(opentype: OpenType, left, right: Rune): float32 =
|
||||||
|
if left notin opentype.cmap.runeToGlyphId or
|
||||||
|
right notin opentype.cmap.runeToGlyphId:
|
||||||
|
return
|
||||||
|
|
||||||
let
|
let
|
||||||
leftGlyphId = opentype.cmap.runeToGlyphId[left]
|
leftGlyphId = opentype.cmap.runeToGlyphId[left]
|
||||||
rightGlyphId = opentype.cmap.runeToGlyphId[right]
|
rightGlyphId = opentype.cmap.runeToGlyphId[right]
|
||||||
|
|
|
@ -4,7 +4,7 @@ import pixie/fontformats/opentype, pixie/fontformats/svgfont, pixie/paths,
|
||||||
const AutoLineHeight* = -1.float32 ## Use default line height for the font size
|
const AutoLineHeight* = -1.float32 ## Use default line height for the font size
|
||||||
|
|
||||||
type
|
type
|
||||||
Typeface = ref object
|
Typeface* = ref object
|
||||||
opentype: OpenType
|
opentype: OpenType
|
||||||
svgFont: SvgFont
|
svgFont: SvgFont
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue