diff options
author | nyamatongwe <unknown> | 2011-07-10 10:38:22 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-07-10 10:38:22 +1000 |
commit | d6680887f548b139a2337277cad67543c0c3ab5f (patch) | |
tree | 342d430083fb139dcb6d83c7a206ff70328a6321 | |
parent | 1bcd5c53f4d187b7c3655bd50d7e0f80ed8f8811 (diff) | |
download | scintilla-mirror-d6680887f548b139a2337277cad67543c0c3ab5f.tar.gz |
Store character set in QuartzTextStyle.
-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 |