diff options
Diffstat (limited to 'cocoa')
| -rw-r--r-- | cocoa/PlatCocoa.mm | 2 | ||||
| -rw-r--r-- | cocoa/QuartzTextStyle.h | 11 | 
2 files changed, 11 insertions, 2 deletions
| diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 1e81fb6e1..dba386750 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -165,7 +165,7 @@ void Font::Create(const char *faceName, int characterSet, int size, bool bold, b  	// Create the font with attributes  	QuartzFont font(faceName, strlen(faceName), size, bold, italic);  	CTFontRef fontRef = font.getFontID(); -	style->setFontRef(fontRef); +	style->setFontRef(fontRef, characterSet);  }  //-------------------------------------------------------------------------------------------------- diff --git a/cocoa/QuartzTextStyle.h b/cocoa/QuartzTextStyle.h index 2825fbb2f..099684ca7 100644 --- a/cocoa/QuartzTextStyle.h +++ b/cocoa/QuartzTextStyle.h @@ -15,7 +15,9 @@ class QuartzTextStyle  public:      QuartzTextStyle()      { +		fontRef = NULL;  		styleDict = CFDictionaryCreateMutable(NULL, 1, NULL, NULL); +		characterSet = 0;      }      ~QuartzTextStyle() @@ -52,9 +54,10 @@ public:  		return ::CTFontGetLeading(fontRef);  	} -	void setFontRef(CTFontRef inRef) +	void setFontRef(CTFontRef inRef, int characterSet_)  	{  		fontRef = inRef; +		characterSet = characterSet_;  		if (styleDict != NULL)  			CFRelease(styleDict); @@ -69,9 +72,15 @@ public:  		return fontRef;  	} +	int getCharacterSet() +	{ +		return characterSet; +	} +	  private:  	CFMutableDictionaryRef styleDict;  	CTFontRef fontRef; +	int characterSet;  };  #endif | 
