summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2009-12-12 18:10:02 +0000
committerMatthias Melcher <fltk@matthiasm.com>2009-12-12 18:10:02 +0000
commit4880ebc521402405c6fbdf90c5e7a48fe8c58d26 (patch)
treecc530e6c61f3befdeba07de5ff9dbc0d2168086b
parent0d99b353a4785d932c56901a6bce5672bccd2bf9 (diff)
Patced antialised fonts for Cocoa builds
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6963 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/fl_font_mac.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx
index 552a579ad..924cd96e2 100644
--- a/src/fl_font_mac.cxx
+++ b/src/fl_font_mac.cxx
@@ -483,9 +483,15 @@ else {
ATSUAttributeTag iTag = kATSUCGContextTag;
ATSUAttributeValuePtr iValuePtr=&fl_gc;
ATSUSetLayoutControls(layout, 1, &iTag, &iSize, &iValuePtr);
-
+
err = ATSUSetTextPointerLocation(layout, uniStr, kATSUFromTextBeginning, n, n);
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, true);
+#endif
err = ATSUDrawText(layout, kATSUFromTextBeginning, n, FloatToFixed(x), FloatToFixed(y));
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, false);
+#endif
#endif
#if defined(__APPLE_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
}
@@ -520,7 +526,13 @@ else {
ATSUSetLayoutControls(layout, 2, iTag, iSize, aAttr);
err = ATSUSetTextPointerLocation(layout, uniStr, kATSUFromTextBeginning, n, n);
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, true);
+#endif
err = ATSUDrawText(layout, kATSUFromTextBeginning, n, FloatToFixed(x), FloatToFixed(y));
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, false);
+#endif
//restore layout baseline
ang = IntToFixed(0);
ATSUSetLayoutControls(layout, 2, iTag, iSize, aAttr);
@@ -553,7 +565,13 @@ else {
ATSUSetLayoutControls (layout, 2, iTag, iSize, aAttr );
err = ATSUSetTextPointerLocation(layout, uniStr, kATSUFromTextBeginning, n, n);
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, true);
+#endif
err = ATSUDrawText(layout, kATSUFromTextBeginning, n, FloatToFixed(x-offs), FloatToFixed(y));
+#if defined(__APPLE_COCOA__)
+ CGContextSetShouldAntialias(fl_gc, false);
+#endif
#endif
#if defined(__APPLE_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
}