aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2018-02-10 10:27:54 +0100
committerJon Leighton <j@jonathanleighton.com>2018-02-22 16:36:05 +0100
commitf22e5ef3bdef97daa7b38cf642f24766cab6c488 (patch)
treea7811c222b0dab2d9364523464fe220ca04656fd /components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
parent691f3be24a6fcc90ae7d0b9b0783abf8674e1b0f (diff)
downloadservo-f22e5ef3bdef97daa7b38cf642f24766cab6c488.tar.gz
servo-f22e5ef3bdef97daa7b38cf642f24766cab6c488.zip
Lazy load fonts in a FontGroup
This is a step towards fixing #17267. To fix that, we need to be able to try various different fallback fonts in turn, which would become unweildy with the prior eager-loading strategy. Prior to this change, FontGroup loaded up all Font instances, including the fallback font, before any of them were checked for the presence of the glyphs we're trying to render. So for the following CSS: font-family: Helvetica, Arial; The FontGroup would contain a Font instance for Helvetica, and a Font instance for Arial, and a Font instance for the fallback font. It may be that Helvetica contains glyphs for every character in the document, and therefore Arial and the fallback font are not needed at all. This change makes the strategy lazy, so that we'll only create a Font for Arial if we cannot find a glyph within Helvetica. I've also substantially refactored the existing code in the process and added some documentation along the way.
Diffstat (limited to 'components/gfx/tests/support/CSSTest/csstest-weights-400.ttf')
0 files changed, 0 insertions, 0 deletions