Replaced implementation of WidthOf by TextWidth.
- TextDimensions (the underlying al_get_text_dimensions) returns the dimensions of the printable characters (non-whitespace) which gives weird results when measuring spaces.
This commit is contained in:
parent
dbc017507c
commit
7f9f10075f
@ -34,7 +34,7 @@ func (f *font) Height() float32 {
|
||||
}
|
||||
|
||||
func (f *font) WidthOf(t string) float32 {
|
||||
return f.Measure(t).Dx()
|
||||
return f.f.TextWidth(t)
|
||||
}
|
||||
|
||||
func (f *font) Measure(t string) geom.RectangleF32 {
|
||||
|
Loading…
Reference in New Issue
Block a user