If you set a font for the commander or the editor, FMSLogo is supposed to keep your preference saved when you restart it. However, if the font face name is longer than 14 characters, FMSLogo fails to preserve the select font name. It does keep the other spaces of the font, including its size.
This was reported by Daniel Ajoy as Support Request #53 as a bug when running under wine, but it applies to Windows as well. It's more visible on Wine because the font names on Linux are generally longer. Font face names on Windows are usually shorter than 14 characters.
The bug is a simple coding error that mixed up character count and byte count. The bug is in how GetConfigurationString checks the return value from RegQueryValueEx:
LONG result = RegQueryValueEx(..., valuePtr, &valueSize);
if (result == ERROR_SUCCESS &&
valueType == REG_SZ &&
valueSize < ValueLength - 1) // <-- BUG: comparing bytes to chars
{
... handle success
}
Here, ValueLength is given in characters. However, RegQueryValueEx sets valueSize to the number of bytes in the return value. Therefore, if the number of bytes in font face name happens to be greater or equal to the maximum number of characters that's legal for a font name minus 1, FMSLogo treats the stored value as corrupt and uses a default value. For font names, the maximum possible is 32 characters and there are two bytes per character, which means that if the length is greater or equal to(32-1)/2, or 15, the default is used.
I expect that this is a regression from FMSlogo 8.0.0, which introduced support for Unicode. I haven't confirmed this.