Commit 3f2cdce9 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Corrected fm_string_width for system font and made it select fontsize 12.8\nwhen using system font.

parent 7499c24d
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment