diff options
author | nyamatongwe <devnull@localhost> | 2011-07-10 10:38:22 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-07-10 10:38:22 +1000 |
commit | 23c222e5a28c4bfd50e087ec1a85c392b9c4a1aa (patch) | |
tree | aa719c24240dc0cc6d0dab48609416e20b8fc580 | |
parent | 9f3cf667691adde1be68e92f08d4e52b86e5edf1 (diff) | |
download | scintilla-mirror-23c222e5a28c4bfd50e087ec1a85c392b9c4a1aa.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 |