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:
Werner Laurensse
2019-11-23 06:53:34 +01:00
committed by Elias Naur
parent aca511f849
commit 4bcb4ec8b6
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -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