diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-07-29 03:50:34 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-07-29 03:50:34 +0300 |
commit | c0845abd897ffd547cd0ac226da99318d5c2fb30 (patch) | |
tree | 5ea21bfe09e2bac350225ecec47c77427957f3ce /source/blender/blenfont/intern/blf_internal_types.h | |
parent | 848dd4a40afed8874abfb499100f09ff291ce14e (diff) |
BLF: Fonts with FT_Face Optional
Allow FontBLFs to exist with NULL FT_Face, added only when actually
needed. Speeds up startup and unused fonts are not loaded.
See D15258 for more details.
Differential Revision: https://developer.blender.org/D15258
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, 5 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 5b55f4af0b8..018cef4540f 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -240,9 +240,13 @@ typedef struct FontBLF { /* # of times this font was loaded */ unsigned int reference_count; - /** File-path or NULL. */ + /* Full path to font file or NULL if from memory. */ char *filepath; + /* Pointer to in-memory font, or NULL if from file. */ + void *mem; + size_t mem_size; + /* Copied from the SFNT OS/2 table. Bit flags for unicode blocks and ranges * considered "functional". Cached here because face might not always exist. * See: https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ur */ |