Commit Graph

8 Commits

Author SHA1 Message Date
Elias Naur ef5cf5b724 op/paint: return ClipOp from Path.End
Instead of adding an implicit ClipOp, return a ClipOp ready to use, freeing the
caller from recording a macro.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur 1b44594411 text/shape: reduce garbage a bit
The sfnt.Buffer embedded in the opentype type caused instances of
it to escape. Move the buffer to Family to avoid that.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-05 22:53:37 +02:00
Elias Naur 2097c6475d text/shape: remove Family.Reset by introducing LRU caches
It was easy to forget Family.Reset, and the per-frame caching strategy is
probably too aggressive. Use a static size for the caches and evict
according to a least recently used policy.

Reset is then no longer required, and we can delete it.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-05 22:27:32 +02:00
Elias Naur 0b637f549d text: rename Face to Family and let Face denote a family configuration
While here, rename Family.Path to Shape which a more precise term.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-05 22:27:32 +02:00
Elias Naur b4a52d3010 text: make text size implicit
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-05 11:22:26 +02:00
Elias Naur 6dad034b22 op/paint: rename PathBuilder to Path
There was no "Path" to "Build", so let's just use the simpler name.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-03 13:35:38 +02:00
Elias Naur 3784ece6dd all: rename package ui to unit
Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur 1d3360699e text/shape: move package measure
Text shaping is a common name for what package measure does. Rename
it to "shape" and move it below the text package.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00