diff --git a/src/pixie/fonts.nim b/src/pixie/fonts.nim index 50eb308..b7b552e 100644 --- a/src/pixie/fonts.nim +++ b/src/pixie/fonts.nim @@ -163,6 +163,9 @@ proc getKerningAdjustment*( let typefaceRight = typeface.fallbackTypeface(right) 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. if typefaceRight == typefaceLeft: if typefaceRight.opentype != nil: