diff --git a/basegraph.cpp b/basegraph.cpp index 76e39067..8c8d1f30 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -484,10 +484,12 @@ struct fontdata { #endif EX map fontdatas; - EX fontdata *cfont, *cfont_chinese; EX fontdata* font_by_name(string fname) { + #if CAP_TABFONT + return &(fontdatas[""]); + #endif auto& fd = fontdatas[fname]; if(fd.filename == "") { fd.filename = fname; @@ -1527,6 +1529,9 @@ EX void init_font() { exit(2); } set_cfont(); +#endif +#if CAP_TABFONT + cfont = cfont_chinese = font_by_name(""); #endif } diff --git a/commandline.cpp b/commandline.cpp index 2095df33..af0c8ab8 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -173,7 +173,7 @@ int arg::readCommon() { else if(argis("-rsrc")) { PHASE(1); shift(); rsrcdir = args(); } else if(argis("-nogui")) { PHASE(1); noGUI = true; } #ifndef EMSCRIPTEN -#if CAP_SDL +#if CAP_SDLTTF else if(argis("-font")) { PHASE(1); shift(); font_id = isize(font_filenames); font_filenames.push_back(args()); font_names.push_back({args(), "commandline"}); } #endif #endif