Add test for CFF font.
This commit is contained in:
parent
7b5ef3c87a
commit
f92e6d49d1
BIN
tests/fonts/Inter-Regular.ttf
Normal file
BIN
tests/fonts/Inter-Regular.ttf
Normal file
Binary file not shown.
BIN
tests/fonts/diffs/cff.png
Normal file
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
BIN
tests/fonts/masters/cff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
tests/fonts/rendered/cff.png
Normal file
BIN
tests/fonts/rendered/cff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue