aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/QuartzTextStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/QuartzTextStyle.h')
-rw-r--r--cocoa/QuartzTextStyle.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cocoa/QuartzTextStyle.h b/cocoa/QuartzTextStyle.h
index 51d03cf91..faffe7616 100644
--- a/cocoa/QuartzTextStyle.h
+++ b/cocoa/QuartzTextStyle.h
@@ -23,6 +23,18 @@ public:
characterSet = 0;
}
+ QuartzTextStyle(const QuartzTextStyle &other)
+ {
+ // Does not copy font colour attribute
+ fontRef = static_cast<CTFontRef>(CFRetain(other.fontRef));
+ styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);
+ characterSet = other.characterSet;
+ }
+
+
~QuartzTextStyle()
{
if (styleDict != NULL)