aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2013-05-02 09:46:17 +1000
committernyamatongwe <nyamatongwe@gmail.com>2013-05-02 09:46:17 +1000
commit0b5be59ffecd30203ecb72245681dc9291c5beaf (patch)
treecd6e115880c1cb9efc5accf847a29eff030d0a68 /cocoa/ScintillaCocoa.mm
parent10ef0672106e223e712d7ee046b9a69eefff48a4 (diff)
downloadscintilla-mirror-0b5be59ffecd30203ecb72245681dc9291c5beaf.tar.gz
Feature: [feature-requests:#988]. Cocoa support for font quality.
From Mark Yen.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 004a1dc46..f018aa351 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1525,6 +1525,14 @@ bool ScintillaCocoa::SyncPaint(void* gc, PRectangle rc)
Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
if (sw)
{
+ CGContextSetAllowsAntialiasing((CGContextRef)gc,
+ vs.extraFontFlag != SC_EFF_QUALITY_NON_ANTIALIASED);
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+ if (CGContextSetAllowsFontSubpixelPositioning != NULL)
+ CGContextSetAllowsFontSubpixelPositioning((CGContextRef)gc,
+ vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
+ vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
+#endif
sw->Init(gc, wMain.GetID());
Paint(sw, rc);
succeeded = paintState != paintAbandoned;