mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
text,font/opentype: make text layout and shaping safe for concurrent use
Implementations of text.Face are reused across multiple windows for efficiency. Make the opentype implementation safe for concurrent use and document it. Updates gio#104 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -45,7 +45,8 @@ type Font struct {
|
||||
Weight Weight
|
||||
}
|
||||
|
||||
// Face implements text layout and shaping for a particular font.
|
||||
// Face implements text layout and shaping for a particular font. All
|
||||
// methods must be safe for concurrent use.
|
||||
type Face interface {
|
||||
Layout(ppem fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error)
|
||||
Shape(ppem fixed.Int26_6, str []Glyph) op.CallOp
|
||||
|
||||
Reference in New Issue
Block a user