From 29794af67a0c53d6a76b8a4cb1a361ecd80e862c Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 9 Jan 2016 18:14:06 -0500 Subject: [PATCH] Filled in text size conversion functions on OS X. --- darwin/draw.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/darwin/draw.m b/darwin/draw.m index b82f4592..e5e4e4b6 100644 --- a/darwin/draw.m +++ b/darwin/draw.m @@ -491,16 +491,17 @@ void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff) uiFree(ff); } +// these two are identical: +// - https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/TypoFeatures/TextSystemFeatures.html#//apple_ref/doc/uid/TP40009459-CH6-51627-BBCCHIFF text points are 72 per inch +// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html#//apple_ref/doc/uid/TP40003290-CH204-SW5 user space points are 72 per inch double uiDrawTextSizeToPoints(double textSize) { - // TODO - return 0; + return textSize; } double uiDrawPointsToTextSize(double points) { - // TODO - return 0; + return points; } struct uiDrawTextLayout {