diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-31 14:38:39 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-31 14:38:39 +0200 |
commit | 94b0c2e7954bd5222f1909b07301da351d99d6f4 (patch) | |
tree | 6b25ddaf2b0f8592ccc8229faf7244203d5d3ec5 /src/fontpack.c | |
parent | 65e5e9df5b479f07e0f4368211f1d46c2138fdd9 (diff) |
FontPack: Debug message about collection size
Diffstat (limited to 'src/fontpack.c')
-rw-r--r-- | src/fontpack.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fontpack.c b/src/fontpack.c index 78181fd4..52ee93be 100644 --- a/src/fontpack.c +++ b/src/fontpack.c | |||
@@ -79,6 +79,15 @@ void init_FontFile(iFontFile *d) { | |||
79 | 79 | ||
80 | static void load_FontFile_(iFontFile *d, const iBlock *data) { | 80 | static void load_FontFile_(iFontFile *d, const iBlock *data) { |
81 | set_Block(&d->sourceData, data); | 81 | set_Block(&d->sourceData, data); |
82 | #if 0 | ||
83 | /* Count the number of available fonts. */ | ||
84 | for (int i = 0; ; i++) { | ||
85 | if (stbtt_GetFontOffsetForIndex(constData_Block(&d->sourceData), i) < 0) { | ||
86 | printf("%s: contains %d fonts\n", cstr_String(&d->id), i); | ||
87 | break; | ||
88 | } | ||
89 | } | ||
90 | #endif | ||
82 | const size_t offset = stbtt_GetFontOffsetForIndex(constData_Block(&d->sourceData), | 91 | const size_t offset = stbtt_GetFontOffsetForIndex(constData_Block(&d->sourceData), |
83 | d->colIndex); | 92 | d->colIndex); |
84 | stbtt_InitFont(&d->stbInfo, constData_Block(data), offset); | 93 | stbtt_InitFont(&d->stbInfo, constData_Block(data), offset); |