diff --git a/c/FontManage b/c/FontManage index 5b2fc85fa58ccfc2821eea67a848e71493d2dee9..b1a94de605b831bd77113476480bc641494b7834 100644 --- a/c/FontManage +++ b/c/FontManage @@ -1545,7 +1545,10 @@ _kernel_oserror * fm_get_string_width(fm_face h, const char * s, int maxwid, int /* The system font case. */ int wCurr, wLastSplit, oLastSplit, oCurr; - int wChar = (FM_System_Size_X(h) * 4000) / 128; /* (Macro defined in FontManage.h) */ + /* (Macro defined in FontManage.h). Important that we take */ + /* account of rounding correctly - compare with formula in */ + /* fm_puts(). */ + int wChar = (FM_System_Size_X(h) * 10 / (128 * wimpt_dx())) * wimpt_dx() * 400; wCurr = wLastSplit = oLastSplit = oCurr = 0; diff --git a/c/Main b/c/Main index 677004152c2b48163d30eee4fa7f68b565ba67a5..13de47de4eb95fe712264dcfce7f8a1c87de0239 100644 --- a/c/Main +++ b/c/Main @@ -656,6 +656,9 @@ static void load_choices(void) if (choices.fontsize > 24) choices.fontsize = 24; choices.fontsize *= 16; + if (!strcmp(lookup_choice("SystemFont:no" ,0,0),"yes")) choices.systemfont = 1; + if (choices.systemfont) choices.fontsize = FM_Standard_Size; + /* None user-configurable options from the Messages file */ fixed.poll_delay = atoi(lookup_token("AnimSpeed:4", 0,0)); @@ -719,7 +722,6 @@ static void load_choices(void) /* Miscellaneous options */ if (!strcmp(lookup_choice("BrickWall:no" ,0,0),"yes")) choices.brickwall = 1; - if (!strcmp(lookup_choice("SystemFont:no" ,0,0),"yes")) choices.systemfont = 1; if (!strcmp(lookup_choice("DelayImage:yes" ,0,0),"yes")) choices.delayimages = 1; if (!strcmp(lookup_choice("DisplayBgs:yes" ,0,0),"yes")) choices.displaybgs = 1; if (!strcmp(lookup_choice("UnderlineLks:yes",0,0),"yes")) choices.underlinelks = 1;