mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:49:30 +02:00
better default font handling
git-svn-id: trunk@4909 -
This commit is contained in:
parent
11a8c94ee7
commit
fe21e46ca1
@ -562,11 +562,17 @@ End;
|
||||
specified record.
|
||||
------------------------------------------------------------------------------}
|
||||
Function TWin32Object.CreateFontIndirect(Const LogFont: TLogFont): HFONT;
|
||||
Var
|
||||
TempLogFont: TLogFont;
|
||||
Begin
|
||||
if String(LogFont.lfFaceName) = 'default' then
|
||||
Result := Windows.GetStockObject(DEFAULT_GUI_FONT)
|
||||
else
|
||||
Result := Windows.CreateFontIndirect(@LogFont);
|
||||
TempLogFont := LogFont;
|
||||
if String(TempLogFont.lfFaceName) = DefFontData.Name then
|
||||
begin
|
||||
Move(FMetrics.lfMessageFont.lfFaceName, TempLogFont.lfFaceName, LF_FACESIZE);
|
||||
if TempLogFont.lfHeight = 0 then
|
||||
TempLogFont.lfHeight := FMetrics.lfMessageFont.lfHeight;
|
||||
end;
|
||||
Result := Windows.CreateFontIndirect(@TempLogFont);
|
||||
End;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -2826,6 +2832,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.84 2003/12/19 18:18:47 micha
|
||||
better default font handling
|
||||
|
||||
Revision 1.83 2003/12/18 10:17:00 micha
|
||||
remove non-useful variable wndlist (thx vincent)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user