From 692c4c1ef347f7b9189cdda8e35d5b6b132a19e1 Mon Sep 17 00:00:00 2001 From: freq Date: Thu, 16 Jan 2014 17:53:18 +0000 Subject: [PATCH] Cocoa: Fix font size bug git-svn-id: trunk@43734 - --- lcl/interfaces/cocoa/cocoagdiobjects.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoagdiobjects.pas b/lcl/interfaces/cocoa/cocoagdiobjects.pas index a8acef056a..51af36dd6d 100644 --- a/lcl/interfaces/cocoa/cocoagdiobjects.pas +++ b/lcl/interfaces/cocoa/cocoagdiobjects.pas @@ -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);