Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/go-text/render
go 1.19

require (
github.com/go-text/typesetting v0.3.0
github.com/go-text/typesetting-utils v0.0.0-20250620161931-017769003e3c
github.com/go-text/typesetting v0.3.4-0.20260223162014-72238c6215e4
github.com/go-text/typesetting-utils v0.0.0-20260223113751-2d88ac90dae3
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
golang.org/x/image v0.23.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/go-text/typesetting v0.3.0 h1:OWCgYpp8njoxSRpwrdd1bQOxdjOXDj9Rqart9ML4iF4=
github.com/go-text/typesetting v0.3.0/go.mod h1:qjZLkhRgOEYMhU9eHBr3AR4sfnGJvOXNLt8yRAySFuY=
github.com/go-text/typesetting-utils v0.0.0-20250620161931-017769003e3c h1:EkVgKYSt3+6Y2FdS5TDAe8WRSVpFzWaMoSk0KVzVy2c=
github.com/go-text/typesetting-utils v0.0.0-20250620161931-017769003e3c/go.mod h1:3/62I4La/HBRX9TcTpBj4eipLiwzf+vhI+7whTc9V7o=
github.com/go-text/typesetting v0.3.4-0.20260223162014-72238c6215e4 h1:d1OLEbU/cRwxS+zaer01/7eDAKUEbHz24EMiF6tYMNQ=
github.com/go-text/typesetting v0.3.4-0.20260223162014-72238c6215e4/go.mod h1:4qZCQphq4KSgGTAeI0uMEkVbROgfah8BuyF5LRYr7XY=
github.com/go-text/typesetting-utils v0.0.0-20260223113751-2d88ac90dae3 h1:drBZzMgdYPbmyXqOto4YhhJGrFIQCX94FpR4MzTCsos=
github.com/go-text/typesetting-utils v0.0.0-20260223113751-2d88ac90dae3/go.mod h1:3/62I4La/HBRX9TcTpBj4eipLiwzf+vhI+7whTc9V7o=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c h1:km8GpoQut05eY3GiYWEedbTT0qnSxrCjsVbb7yKY1KE=
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c/go.mod h1:cNQ3dwVJtS5Hmnjxy6AgTPd0Inb3pW05ftPSX7NZO7Q=
Expand Down
2 changes: 1 addition & 1 deletion render.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (r *Renderer) DrawShapedRunAt(run shaping.Output, img draw.Image, startX, s
_ = r.drawSVG(g, format, img, xPos, yPos)
}

x += fixed266ToFloat(g.XAdvance) * r.PixScale
x += fixed266ToFloat(g.Advance) * r.PixScale
}
f.Draw()
r.filler = nil
Expand Down
4 changes: 2 additions & 2 deletions render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func Test_Render(t *testing.T) {
r.Color = color.NRGBA{R: 0xcc, G: 0x66, B: 0x33, A: 0xcc}
r.DrawStringAt("\uE0A2░", img, 366, 164, f4)

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

str = "Hello ज्या 😀! 🎁 fin."
Expand Down
12 changes: 0 additions & 12 deletions testdata/cherry/LICENSE

This file was deleted.

Binary file removed testdata/cherry/cherry-10-r.otb
Binary file not shown.
Binary file modified testdata/out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.