Don't crash when kerning two different fonts together, just don't apply kerning.
This commit is contained in:
parent
7d89181130
commit
16d9c9cbf2
1 changed files with 3 additions and 0 deletions
|
@ -163,6 +163,9 @@ proc getKerningAdjustment*(
|
||||||
let
|
let
|
||||||
typefaceRight = typeface.fallbackTypeface(right)
|
typefaceRight = typeface.fallbackTypeface(right)
|
||||||
typefaceLeft = typeface.fallbackTypeface(left)
|
typefaceLeft = typeface.fallbackTypeface(left)
|
||||||
|
# Is there a type face that matches?
|
||||||
|
if typefaceRight == nil or typefaceLeft == nil:
|
||||||
|
return
|
||||||
# Only do kerning if both typefaces are the same.
|
# Only do kerning if both typefaces are the same.
|
||||||
if typefaceRight == typefaceLeft:
|
if typefaceRight == typefaceLeft:
|
||||||
if typefaceRight.opentype != nil:
|
if typefaceRight.opentype != nil:
|
||||||
|
|
Loading…
Reference in a new issue