From e8c1e1ba110d9bd15a88431cf95fae6e4b7c4f36 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Fri, 8 May 2026 18:20:49 +0300 Subject: [PATCH] font/opentype: fix font.Face creation typesetting introduced a cache field that needs to be properly initialized. Use constructor to avoid the issue. Signed-off-by: Egon Elbre --- font/opentype/opentype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/font/opentype/opentype.go b/font/opentype/opentype.go index 025a1203..99c0b678 100644 --- a/font/opentype/opentype.go +++ b/font/opentype/opentype.go @@ -106,7 +106,7 @@ func parseLoader(ld *opentype.Loader) (*fontapi.Font, giofont.Font, error) { // Face many be invoked any number of times and is safe so long as each return value is // only used by one goroutine. func (f Face) Face() *fontapi.Face { - return &fontapi.Face{Font: f.face} + return fontapi.NewFace(f.face) } // FontFace returns a text.Font with populated font metadata for the