updated + new pixie masters

This commit is contained in:
Ryan Oldenburg 2021-06-28 20:35:37 -05:00
parent f6f54ca8e5
commit e780539168
58 changed files with 79 additions and 57 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -21,7 +21,8 @@ block:
let image = newImage(200, 100) let image = newImage(200, 100)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText(font, "fill") image.fillText(font, "fill")
image.writeFile("tests/fonts/image_fill.png")
doDiff(image, "image_fill")
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
@ -29,51 +30,56 @@ block:
let image = newImage(200, 100) let image = newImage(200, 100)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.strokeText(font, "stroke") image.strokeText(font, "stroke")
image.writeFile("tests/fonts/image_stroke.png")
doDiff(image, "image_stroke")
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 64 font.size = 64
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.fillText(font, "fill") mask.fillText(font, "fill")
writeFile("tests/fonts/mask_fill.png", mask.encodePng())
doDiff(newImage(mask), "mask_fill")
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 64 font.size = 64
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.strokeText(font, "stroke") mask.strokeText(font, "stroke")
writeFile("tests/fonts/mask_stroke.png", mask.encodePng())
doDiff(newImage(mask), "mask_stroke")
block: block:
# SVG Fonts have no masters
block:
var font = readFont("tests/fonts/Changa-Bold.svg") var font = readFont("tests/fonts/Changa-Bold.svg")
font.size = 48 font.size = 48
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.fillText(font, "Changa") mask.fillText(font, "Changa")
writeFile("tests/fonts/svg_changa.png", mask.encodePng()) writeFile("tests/fonts/svg_changa.png", mask.encodePng())
block: block:
var font = readFont("tests/fonts/DejaVuSans.svg") var font = readFont("tests/fonts/DejaVuSans.svg")
font.size = 48 font.size = 48
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.fillText(font, "Deja vu ") mask.fillText(font, "Deja vu ")
writeFile("tests/fonts/svg_dejavu.png", mask.encodePng()) writeFile("tests/fonts/svg_dejavu.png", mask.encodePng())
block: block:
var font = readFont("tests/fonts/IBMPlexSans-Regular.svg") var font = readFont("tests/fonts/IBMPlexSans-Regular.svg")
font.size = 48 font.size = 48
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.fillText(font, "IBM ") mask.fillText(font, "IBM ")
writeFile("tests/fonts/svg_ibm.png", mask.encodePng()) writeFile("tests/fonts/svg_ibm.png", mask.encodePng())
block: block:
var font = readFont("tests/fonts/Moon-Bold.svg") var font = readFont("tests/fonts/Moon-Bold.svg")
font.size = 48 font.size = 48
let mask = newMask(200, 100) let mask = newMask(200, 100)
mask.fillText(font, "Moon ") mask.fillText(font, "Moon ")
writeFile("tests/fonts/svg_moon.png", mask.encodePng()) writeFile("tests/fonts/svg_moon.png", mask.encodePng())
block: block:
var font = readFont("tests/fonts/Ubuntu.svg") var font = readFont("tests/fonts/Ubuntu.svg")
font.size = 48 font.size = 48
let mask = newMask(200, 100) let mask = newMask(200, 100)
@ -180,6 +186,21 @@ block:
doDiff(image, "basic9") doDiff(image, "basic9")
block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 24
let image = newImage(200, 100)
image.fill(rgba(255, 255, 255, 255))
image.fillText(
font,
"a b c d e f g h i j k l m n o p",
bounds = vec2(200, 0),
hAlign = haRight
)
doDiff(image, "basic10")
const const
paragraph = "ShehadcometotheconclusionthatyoucouldtellalotaboutapersonbytheirearsThewaytheystuckoutandthesizeoftheearlobescouldgiveyou" paragraph = "ShehadcometotheconclusionthatyoucouldtellalotaboutapersonbytheirearsThewaytheystuckoutandthesizeoftheearlobescouldgiveyou"
paragraph_2 = "She had come to the conclusion that you could tell a lot about a person by their ears The way they stuck out and the size of the earlobes could give you wonderful insights into the person Of course she couldnt scientifically prove any of this but that didnt matter to her Before anything else she would size up the ears of the person she was talking to Shes asked the question so many times that she barely listened to the answers anymore The answers were always the same Well not exactly the same but the same in a general sense A more accurate description was the answers never surprised her" paragraph_2 = "She had come to the conclusion that you could tell a lot about a person by their ears The way they stuck out and the size of the earlobes could give you wonderful insights into the person Of course she couldnt scientifically prove any of this but that didnt matter to her Before anything else she would size up the ears of the person she was talking to Shes asked the question so many times that she barely listened to the answers anymore The answers were always the same Well not exactly the same but the same in a general sense A more accurate description was the answers never surprised her"
@ -363,9 +384,9 @@ block:
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 200 font.size = 100
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -377,10 +398,10 @@ block:
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 200 font.size = 100
font.noKerningAdjustments = true font.noKerningAdjustments = true
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -392,9 +413,9 @@ block:
block: block:
var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf") var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf")
font.size = 200 font.size = 100
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -406,10 +427,10 @@ block:
block: block:
var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf") var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf")
font.size = 200 font.size = 100
font.noKerningAdjustments = true font.noKerningAdjustments = true
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -421,9 +442,9 @@ block:
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 200 font.size = 100
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -435,10 +456,10 @@ block:
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 200 font.size = 100
font.noKerningAdjustments = true font.noKerningAdjustments = true
let image = newImage(2800, 400) let image = newImage(1400, 200)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -450,9 +471,9 @@ block:
block: block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf") var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 100 font.size = 50
let image = newImage(2800, 200) let image = newImage(1400, 100)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -464,9 +485,9 @@ block:
block: block:
var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf") var font = readFont("tests/fonts/Ubuntu-Regular_1.ttf")
font.size = 100 font.size = 50
let image = newImage(2800, 200) let image = newImage(1400, 100)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -478,9 +499,9 @@ block:
block: block:
var font = readFont("tests/fonts/IBMPlexSans-Regular_2.ttf") var font = readFont("tests/fonts/IBMPlexSans-Regular_2.ttf")
font.size = 100 font.size = 50
let image = newImage(2800, 200) let image = newImage(1400, 100)
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
image.fillText( image.fillText(
font, font,
@ -621,14 +642,15 @@ block:
], ],
gradientStops: @[ gradientStops: @[
ColorStop(color: rgba(255, 0, 0, 255), position: 0), ColorStop(color: rgba(255, 0, 0, 255), position: 0),
ColorStop(color: rgba(255, 0, 0, 40), position: 1.0), ColorStop(color: rgba(255, 0, 0, 127), position: 1.0),
] ]
) )
let image = newImage(100, 100) let image = newImage(100, 100)
image.fill(rgba(255, 255, 255, 255))
image.fillText(font, "Text") image.fillText(font, "Text")
image.writeFile("tests/fonts/image_paint_fill.png") doDiff(image, "image_paint_fill")
block: block:
var font1 = readFont("tests/fonts/Roboto-Regular_1.ttf") var font1 = readFont("tests/fonts/Roboto-Regular_1.ttf")
@ -656,7 +678,7 @@ block:
doDiff(image, "spans1") doDiff(image, "spans1")
let ctx = newContext(image) let ctx = newContext(image)
ctx.fillStyle = rgba(128, 128, 128, 128) ctx.fillStyle = rgba(127, 127, 127, 127)
for i, rect in arrangement.selectionRects: for i, rect in arrangement.selectionRects:
ctx.fillRect(rect) ctx.fillRect(rect)
@ -688,7 +710,7 @@ block:
doDiff(image, "spans2") doDiff(image, "spans2")
let ctx = newContext(image) let ctx = newContext(image)
ctx.fillStyle = rgba(128, 128, 128, 128) ctx.fillStyle = rgba(127, 127, 127, 127)
for i, rect in arrangement.selectionRects: for i, rect in arrangement.selectionRects:
ctx.fillRect(rect) ctx.fillRect(rect)
@ -702,13 +724,13 @@ block:
image.fill(rgba(255, 255, 255, 255)) image.fill(rgba(255, 255, 255, 255))
let arrangement = typeset( let arrangement = typeset(
font, "Wrapping text to new line", bounds = image.wh font, "Wrapping text to the next line", bounds = image.wh
) )
image.fillText(arrangement) image.fillText(arrangement)
let ctx = newContext(image) let ctx = newContext(image)
ctx.fillStyle = rgba(128, 128, 128, 128) ctx.fillStyle = rgba(127, 127, 127, 127)
for i, rect in arrangement.selectionRects: for i, rect in arrangement.selectionRects:
ctx.fillRect(rect) ctx.fillRect(rect)