mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 08:19:41 +02:00
Cocoa fonts: comments
git-svn-id: trunk@62530 -
This commit is contained in:
parent
18ce1577f9
commit
98c349fc08
@ -646,7 +646,7 @@ begin
|
||||
if ALogFont.lfHeight = 0 then
|
||||
FSize := Round(NSFont.systemFontSize)
|
||||
else
|
||||
FSize := Abs(ALogFont.lfHeight);
|
||||
FSize := Abs(ALogFont.lfHeight); // To-Do: emulate WinAPI difference between negative and absolute height values
|
||||
|
||||
// create font attributes
|
||||
Win32Weight := ALogFont.lfWeight;
|
||||
|
@ -1300,7 +1300,7 @@ begin
|
||||
Result := SizeOf(TLogFont);
|
||||
FillChar(ALogFont^, SizeOf(ALogFont^), 0);
|
||||
ALogFont^.lfFaceName := AFont.Name;
|
||||
ALogFont^.lfHeight := -AFont.Size;
|
||||
ALogFont^.lfHeight := -AFont.Size; // Cocoa supports only full height (with leading) that corresponds with a negative value in WinAPI
|
||||
Traits := NSFontManager.sharedFontManager.traitsOfFont(AFont.Font);
|
||||
if (Traits and NSFontBoldTrait) <> 0 then
|
||||
ALogFont^.lfWeight := FW_BOLD
|
||||
|
Loading…
Reference in New Issue
Block a user