mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
text: add Metrics method to Face interface. font/opentype: implement Metrics method for Font struct.
Signed-off-by: Werner Laurensse <werner@alman.ax>
This commit is contained in:
committed by
Elias Naur
parent
aca511f849
commit
4bcb4ec8b6
@@ -5,6 +5,7 @@ package text
|
||||
import (
|
||||
"gioui.org/op/clip"
|
||||
"gioui.org/unit"
|
||||
"golang.org/x/image/font"
|
||||
"golang.org/x/image/math/fixed"
|
||||
)
|
||||
|
||||
@@ -60,6 +61,7 @@ type Font struct {
|
||||
type Face interface {
|
||||
Layout(ppem fixed.Int26_6, str string, opts LayoutOptions) *Layout
|
||||
Shape(ppem fixed.Int26_6, str String) clip.Op
|
||||
Metrics(ppem fixed.Int26_6) font.Metrics
|
||||
}
|
||||
|
||||
// Typeface identifies a particular typeface design. The empty
|
||||
|
||||
Reference in New Issue
Block a user