diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-08-04 23:05:19 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-08-04 23:05:19 +0300 |
commit | 9d77b5a0ed7bed48dcb7483e79945067666eac0b (patch) | |
tree | 21acf2c4dd9665568c4d41761485f3bf3952b929 /source/blender/blenfont/intern/blf_internal_types.h | |
parent | fca7cb01011a3e34d21fcff6800d0b26b2be6e8e (diff) |
BLF: Implement FreeType Caching
Implementation of the FreeType 2 cache subsystem, which limits the
number of concurrently-opened FT_Face and FT_Size objects, as well as
caching information like character maps to speed up glyph id lookups.
See D13137 for much more detail.
Differential Revision: https://developer.blender.org/D13137
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal_types.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 018cef4540f..007b717ab93 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -329,6 +329,12 @@ typedef struct FontBLF { /* freetype2 face. */ FT_Face face; + /* FreeType size is separated from face when using their caching subsystem. */ + FT_Size ft_size; + + /* Copy of the font->face->face_flags, in case we don't have a face loaded. */ + FT_Long face_flags; + /* data for buffer usage (drawing into a texture buffer) */ FontBufInfoBLF buf_info; |