diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-13 18:41:21 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-13 18:41:21 +0000 |
| commit | 8035bbfbdbd7412799ec06f6bb2fe1f74d450d30 (patch) | |
| tree | bff24f5dd75a3c20dc458577d0cd534d98ba2351 /doc | |
| parent | output: track output we're mapped on, and use maximum scale (diff) | |
font: handle invalid glyphs correctly
*All* glyphs are cached.
But we never set the 'wc' member of failed glyphs, causing a later
cache lookup of the same glyph miss in the cache, and thus re-generate
yet another glyph (that is inserted into the cache). I.e. if the
same (invalid) glyph is rendered over and over again, we'll end up
growing the cache indefinitely.
Fix by setting the 'wc' member of invalid glyphs. This causes a cache
lookup to hit. But, we must also check the glyphs validity, and return
NULL if the glyph isn't valid.
Finally, when destroying a font, skip invalid glyphs, since they have
no resources that needs to be freed.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
