From 83a58ae4efb07e4d2de8cb21e5cca86a26f138ce Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 7 Aug 2011 19:39:15 +1000 Subject: Support a range of weights on Cocoa. --- cocoa/QuartzTextStyleAttribute.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cocoa/QuartzTextStyleAttribute.h') diff --git a/cocoa/QuartzTextStyleAttribute.h b/cocoa/QuartzTextStyleAttribute.h index 33c49281c..b9698645e 100644 --- a/cocoa/QuartzTextStyleAttribute.h +++ b/cocoa/QuartzTextStyleAttribute.h @@ -16,12 +16,13 @@ class QuartzFont { public: /** Create a font style from a name. */ - QuartzFont( const char* name, size_t length, float size, bool bold, bool italic ) + QuartzFont( const char* name, size_t length, float size, int weight, bool italic ) { assert( name != NULL && length > 0 && name[length] == '\0' ); CFStringRef fontName = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingMacRoman); assert(fontName != NULL); + bool bold = weight > SC_WEIGHT_NORMAL; if (bold || italic) { -- cgit v1.2.3