I think the function SetIdenticalFontSources is a big design error.
these code lines are called for RadioButton, EveToggle, EveButton, EveText
Code: Select all
while (i) do
begin
pRadioButton := TRadioButtonPtr(ptrO^);
if (pRadioButton^.FontHandle < 16) then
begin
if (pRadioButton^.Source = -1) then
begin
currSource := FT800_Res_LoadFont(pRadioButton^.FontName);
pRadioButton^.Source := currSource;
SetIdenticalFontSources(pRadioButton^.FontName, currSource);
end;
end;
Inc(ptrO);
Dec(i);
end;
These routine is always called in LoadCurrentScreenResToGRAM and does nothing after the first FT800_Res_LoadFont. The font is still there.
if there is a table of FontHandle to Source like
Code: Select all
var
FontTable: array[0..15] of record
FontName: ^char
FontSource: longint;
end;
Code: Select all
procedure LoadFont(FontHandle: longint);
begin
if (Fonthandle<16) and (FontTable[FontHandle].FontSource=-1) then begin
FontTable[FontHandle].FontSource := FT800_Res_LoadFont(FontTable[FontHandle].FontName);
end;
end;
best regards
Thomas