Blender Git Loki

Git Commits -> Revision 01c21b0

August 16, 2021, 04:19 (GMT)
BLF: Do Not Cache Unused Rendered Glyphs

The loading of a font size or style renders bitmaps of the characters
0-255 and stores them in a cache. But glyphs 128-255 in this cache are
not accessible. What used to be ansi high-bit characters are now multi-
byte UTF-8 sequences.

Therefore this patch reduces the glyph_ascii_table size to 128 and
only caches characters 32-127, the visible portion of ASCII, which
greatly reduces the time to load a font.

See D12189 for more details.

Differential Revision: https://developer.blender.org/D12189

Reviewed by Campbell Barton

Commit Details:

Full Hash: 01c21b0ac44ad024f9f4b3c07e3ebd01efcc4f05
Parent Commit: 73b2692
Committed By: YimingWu
Lines Changed: +3, -2

2 Modified Paths:

/source/blender/blenfont/intern/blf_font.c (+2, -1) (Diff)
/source/blender/blenfont/intern/blf_internal_types.h (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021