From 1350b495c81bb47bca730b83954ecefba6f7b36f Mon Sep 17 00:00:00 2001 From: Walter Werner SCHNEIDER Date: Wed, 1 Sep 2021 21:47:06 +0300 Subject: [PATCH] text/shaper: use consistent method receiver name Signed-off-by: Walter Werner SCHNEIDER --- text/shaper.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/text/shaper.go b/text/shaper.go index fee7ab1c..0cfe3ce0 100644 --- a/text/shaper.go +++ b/text/shaper.go @@ -90,21 +90,21 @@ func NewCache(collection []FontFace) *Cache { } // Layout implements the Shaper interface. -func (s *Cache) Layout(font Font, size fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error) { - cache := s.lookup(font) +func (c *Cache) Layout(font Font, size fixed.Int26_6, maxWidth int, txt io.Reader) ([]Line, error) { + cache := c.lookup(font) return cache.face.Layout(size, maxWidth, txt) } // LayoutString is a caching implementation of the Shaper interface. -func (s *Cache) LayoutString(font Font, size fixed.Int26_6, maxWidth int, str string) []Line { - cache := s.lookup(font) +func (c *Cache) LayoutString(font Font, size fixed.Int26_6, maxWidth int, str string) []Line { + cache := c.lookup(font) return cache.layout(size, maxWidth, str) } // Shape is a caching implementation of the Shaper interface. Shape assumes that the layout // argument is unchanged from a call to Layout or LayoutString. -func (s *Cache) Shape(font Font, size fixed.Int26_6, layout Layout) op.CallOp { - cache := s.lookup(font) +func (c *Cache) Shape(font Font, size fixed.Int26_6, layout Layout) op.CallOp { + cache := c.lookup(font) return cache.shape(size, layout) }