text: consume io.Reader in shaper

io.Reader is actually a more efficient interface than io.RuneReader,
as we can pull bytes out and check for cache hits without doing
redundant rune<->string conversions. This isn't implemented yet,
however.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2022-12-21 13:57:31 -05:00
committed by Elias Naur
parent 0b456579a9
commit 5d6cc2892d
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ func TestShapingNewlineHandling(t *testing.T) {
}
checkGlyphs()
cache.Layout(Parameters{
cache.LayoutReader(Parameters{
Alignment: Middle,
PxPerEm: fixed.I(10),
}, 200, 200, english, strings.NewReader(tc.textInput))