Only save fonts that are not defaults
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 6 Apr 2016 12:38:43 +0000 (14:38 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 17 Apr 2016 08:24:58 +0000 (10:24 +0200)
When the font in use is a (size-adapted) default, we don't save
it in the settings file.

gtk/xboard.c

index 6fd5ea4..5498622 100644 (file)
@@ -527,9 +527,10 @@ SaveFontArg (FILE *f, ArgDescriptor *ad)
     default:
       return;
   }
+  if(fontIsSet[n])           // only save fonts that were not defaults
   for(i=0; i<NUM_SIZES; i++) // [HGM] font: current font becomes standard for current size
     if(sizeDefaults[i].squareSize == initialSquareSize) { // only for standard sizes!
-       fontTable[n][initialSquareSize] = strdup(name);
+       ASSIGN(fontTable[n][initialSquareSize], name);
        fontValid[n][initialSquareSize] = True;
        break;
   }