Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-07-29 03:50:34 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-07-29 03:50:34 +0300
commitc0845abd897ffd547cd0ac226da99318d5c2fb30 (patch)
tree5ea21bfe09e2bac350225ecec47c77427957f3ce /source/blender/blenfont/intern/blf_internal_types.h
parent848dd4a40afed8874abfb499100f09ff291ce14e (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.h6
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 */