procedure CfgSetFontValue(cfg: TXMLConfig; AKey: WideString; AFont: TFont);
var
tmp: TFontStyles;
tmpDWord: DWord absolute tmp;
begin
cfg.SetValue(AKey + '/name/value', AFont.Name);
cfg.SetValue(AKey + '/size/value', AFont.Size);
cfg.SetValue(AKey + '/color/value', ColorToString(AFont.Color));
tmp := AFont.Style;
cfg.SetValue(AKey + '/style/value', tmpDWord);
end;
procedure CfgGetFontValue(cfg: TXMLConfig; AKey: WideString; AFont: TFont);
var
tmp: DWord;
tmpStyles: TFontStyles absolute tmp;
begin
AFont.Name := cfg.GetValue(AKey + '/name/value', 'default');
AFont.Size := cfg.GetValue(AKey + '/size/value', 0);
AFont.Color:= StringToColor(cfg.GetValue(AKey + '/color/value', 'clWindowText'));
tmp := cfg.GetValue(AKey + '/style/value', 0);
AFont.Style:= tmpStyles;
end;