Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse a smarter strategy to speed up text run shaping #229
Labels
Comments
|
Servo now caches shaping results per word. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gecko, for example, caches shaping results on a per-word basis and then copies the words into a glyph store when shaping is requested. The cache is stored with
gfx::Fontinstances (i.e., tied to a particular size).This caching reduces the size of inputs and outputs to harfbuzz, and reduces the number of shaping calls. In gecko this mainly is useful for scaling shaping with the number of unique words; in Servo it would be even more useful while we are still doing non-incremental layout (shaping entire text run over and over).