Add test for CFF font.

This commit is contained in:
treeform 2021-09-03 08:41:16 -07:00
parent 7b5ef3c87a
commit f92e6d49d1
5 changed files with 9 additions and 0 deletions

Binary file not shown.

BIN
tests/fonts/diffs/cff.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
tests/fonts/masters/cff.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -994,3 +994,12 @@ block:
block:
var typeface = readTypeface("tests/fonts/Roboto-Regular_1.ttf")
doAssert typeface.getKerningAdjustment('T'.Rune, 'e'.Rune) == -99.0
block:
var font = readFont("tests/fonts/Inter-Regular.ttf")
font.size = 26
let image = newImage(800, 100)
image.fill(rgba(255, 255, 255, 255))
image.fillText(font, "Grumpy wizards make toxic brew for the evil Queen and Jack.")
doDiff(image, "cff")