Cocoa: Fix font size bug

git-svn-id: trunk@43734 -
This commit is contained in:
freq 2014-01-16 17:53:18 +00:00
parent 8bce6066ca
commit 692c4c1ef3

View File

@ -527,7 +527,7 @@ begin
FSize := Round(NSFont.systemFontSize);
end
else
FSize := ALogFont.lfHeight;
FSize := Abs(ALogFont.lfHeight);
// create font attributes
Win32Weight := ALogFont.lfWeight;
@ -543,7 +543,7 @@ begin
Attributes := NSDictionary.dictionaryWithObjectsAndKeys(
NSStringUTF8(FName), NSFontFamilyAttribute,
NSNumber.numberWithFloat(ALogFont.lfHeight), NSFontSizeAttribute,
NSNumber.numberWithFloat(FSize), NSFontSizeAttribute,
nil);
Descriptor := NSFontDescriptor.fontDescriptorWithFontAttributes(Attributes);