Skip to content

Commit c12581b

Browse files
committed
use font sample already bundled in typesetting-utils
1 parent 9a733e3 commit c12581b

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

render_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func Test_Render(t *testing.T) {
5656
r.Color = color.NRGBA{R: 0xcc, G: 0x66, B: 0x33, A: 0xcc}
5757
r.DrawStringAt("\uE0A2░", img, 366, 164, f4)
5858

59-
data, _ = os.Open("testdata/cherry/cherry-10-r.otb")
60-
f5, _ := font.ParseTTF(data)
59+
content, _ := ot.Files.ReadFile("bitmap/cherry-10-r.otb")
60+
f5, _ := font.ParseTTF(bytes.NewReader(content))
6161
(&render.Renderer{FontSize: 10, PixScale: 1, Color: color.Black}).DrawStringAt("Hello, world!", img, 6, 10, f5)
6262

6363
str = "Hello ज्या 😀! 🎁 fin."

testdata/cherry/LICENSE

Lines changed: 0 additions & 12 deletions
This file was deleted.

testdata/cherry/cherry-10-r.otb

-3.68 KB
Binary file not shown.

0 commit comments

Comments
 (0)