summaryrefslogtreecommitdiff
path: root/src/fontpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontpack.c')
-rw-r--r--src/fontpack.c9
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
80static void load_FontFile_(iFontFile *d, const iBlock *data) { 80static 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);