M text/shaper.go => text/shaper.go +1 -7
@@ 177,15 177,9 @@ func NewShaper(collection []FontFace) *Shaper {
return l
}
-// Layout a text according to a set of options. Results can be retrieved by
-// iteratively calling NextGlyph.
-func (l *Shaper) Layout(params Parameters, minWidth, maxWidth int, lc system.Locale, txt io.RuneReader) {
- l.layoutText(params, minWidth, maxWidth, lc, txt, "")
-}
-
// Layout text from an io.Reader according to a set of options. Results can be retrieved by
// iteratively calling NextGlyph.
-func (l *Shaper) LayoutReader(params Parameters, minWidth, maxWidth int, lc system.Locale, txt io.Reader) {
+func (l *Shaper) Layout(params Parameters, minWidth, maxWidth int, lc system.Locale, txt io.Reader) {
l.layoutText(params, minWidth, maxWidth, lc, bufio.NewReader(txt), "")
}
M text/shaper_test.go => text/shaper_test.go +1 -1
@@ 113,7 113,7 @@ func TestShapingNewlineHandling(t *testing.T) {
}
checkGlyphs()
- cache.LayoutReader(Parameters{
+ cache.Layout(Parameters{
Alignment: Middle,
PxPerEm: fixed.I(10),
}, 200, 200, english, strings.NewReader(tc.textInput))
M widget/text.go => widget/text.go +1 -1
@@ 399,7 399,7 @@ func (e *textView) layoutText(lt *text.Shaper) {
e.index = glyphIndex{}
it := textIterator{viewport: image.Rectangle{Max: image.Point{X: math.MaxInt, Y: math.MaxInt}}}
if lt != nil {
- lt.LayoutReader(text.Parameters{
+ lt.Layout(text.Parameters{
Font: e.font,
PxPerEm: e.textSize,
Alignment: e.Alignment,