Skip to content

Commit 4e0b144

Browse files
committed
glfw34: tried to update typesetting but needs #254 to be merged first.
1 parent 34db85d commit 4e0b144

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

paint/renderers/rasterx/text.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,16 @@ func (rs *Renderer) TextRun(ctx *render.Context, run *shapedgt.Run, ln *shaped.L
168168
default:
169169
fmt.Printf("unrecognized glyph data: %T\n", data)
170170
}
171+
// todo: once https://github.com/go-text/typesetting/pull/254 is merged
172+
// if data, ok := run.Face.GlyphDataSVG(g.GlyphID); ok {
173+
// rs.GlyphSVG(ctx, run, g, data.Source, bb, pos, identity)
174+
// } else if data, ok := run.Face.GlyphDataBitmap(g.GlyphID); ok {
175+
// rs.GlyphBitmap(ctx, run, g, data, fill, stroke, bb, pos, identity)
176+
// } else if data, ok := run.Face.GlyphDataOutline(g.GlyphID); ok {
177+
// rs.GlyphOutline(ctx, run, g, data, fill, stroke, bb, pos, identity)
178+
// } else {
179+
// fmt.Printf("unrecognized glyph data for glyphID: %v, face: %v\n", g.GlyphID, run.Face.Describe().Family)
180+
// }
171181
off.X += math32.FromFixed(g.XAdvance)
172182
off.Y -= math32.FromFixed(g.YAdvance)
173183
}

0 commit comments

Comments
 (0)