summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-06 12:16:43 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-06 12:16:43 +0300
commit61a3dc017067be43472dadb7909094aa04d1fe9d (patch)
tree18b87895489844b4e516f79cd1588038f1d49494 /src/main.c
parentf6a54d5375aab9c41af3f7c8a5e8fcbd1e0c9287 (diff)
Revised runtime font management
The built-in fonts are loaded via FontPack, and the font table is now constructed dynamically based on available fonts. A full set of variants (style, size) are prepared for each font, but some of the data gets allocated lazily when needed. GmRun needed a larger allocation for fonts, so now all the fields are combined into a single bit field. TODO: Glyph scaling, vertical offsets, and symbol lookup are still not fully working.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 61320e79..146f13f2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,6 +68,9 @@ int main(int argc, char **argv) {
68 SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1"); 68 SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
69 SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, "1"); 69 SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, "1");
70 SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); 70 SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
71#if 0
72 SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "1"); /* debugging! */
73#endif
71 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)) { 74 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)) {
72 fprintf(stderr, "[SDL] init failed: %s\n", SDL_GetError()); 75 fprintf(stderr, "[SDL] init failed: %s\n", SDL_GetError());
73 return -1; 76 return -1;