mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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 <egonelbre@gmail.com>
This commit is contained in:
@@ -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
|
// Face many be invoked any number of times and is safe so long as each return value is
|
||||||
// only used by one goroutine.
|
// only used by one goroutine.
|
||||||
func (f Face) Face() *fontapi.Face {
|
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
|
// FontFace returns a text.Font with populated font metadata for the
|
||||||
|
|||||||
Reference in New Issue
Block a user