Add tests for underline and strike though. More const.
|
@ -889,7 +889,7 @@ const cffStandardStrings = [
|
|||
"Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000",
|
||||
"001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"]
|
||||
|
||||
let TOP_DICT_META = {
|
||||
const TOP_DICT_META = {
|
||||
0: "version",
|
||||
1: "notice",
|
||||
1200: "copyright",
|
||||
|
@ -922,7 +922,7 @@ let TOP_DICT_META = {
|
|||
1238: "fontName",
|
||||
}.toTable
|
||||
|
||||
let PRIVATE_DICT_META = {
|
||||
const PRIVATE_DICT_META = {
|
||||
19: "subrs",
|
||||
20: "defaultWidthX",
|
||||
21: "nominalWidthX",
|
||||
|
|
BIN
tests/fonts/diffs/cff_strikethrough.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
tests/fonts/diffs/cff_underline.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
tests/fonts/masters/cff_strikethrough.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
tests/fonts/masters/cff_underline.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
tests/fonts/masters/cff_wrapping.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
tests/fonts/rendered/cff_strikethrough.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
tests/fonts/rendered/cff_underline.png
Normal file
After Width: | Height: | Size: 16 KiB |
|
@ -1004,7 +1004,6 @@ block:
|
|||
|
||||
doDiff(image, "cff")
|
||||
|
||||
|
||||
block:
|
||||
var font = readFont("tests/fonts/NotoSansJP-Regular.ttf")
|
||||
font.size = 26
|
||||
|
@ -1013,3 +1012,23 @@ block:
|
|||
image.fillText(font, "仰コソ会票カク帰了ノ終準港みせス議徳モチタ提請ルまつ力路お")
|
||||
|
||||
doDiff(image, "cff_jp")
|
||||
|
||||
block:
|
||||
var font = readFont("tests/fonts/Inter-Regular.ttf")
|
||||
font.size = 26
|
||||
font.underline = true
|
||||
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_underline")
|
||||
|
||||
block:
|
||||
var font = readFont("tests/fonts/Inter-Regular.ttf")
|
||||
font.size = 26
|
||||
font.strikethrough = true
|
||||
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_strikethrough")
|
||||
|
|