diff src/macterm.c @ 90667:dbe3f29e61d6

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 505-522) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: etc/TUTORIAL.cn: Updated. - Merge from erc--emacs--22 * gnus--rel--5.10 (patch 164-167) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-137
author Miles Bader <miles@gnu.org>
date Tue, 21 Nov 2006 08:56:38 +0000
parents 02cf29720f31 a019988291b9
children 6588c6259dfb
line wrap: on
line diff
--- a/src/macterm.c	Tue Nov 21 01:10:47 2006 +0000
+++ b/src/macterm.c	Tue Nov 21 08:56:38 2006 +0000
@@ -1362,20 +1362,31 @@
   if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
     CGContextSetShouldAntialias (context, false);
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
-  CGContextSetTextPosition (context, gx, gy);
-  CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
-  if (overstrike_p)
-    {
-      CGContextSetTextPosition (context, gx + 1.0f, gy);
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+  if (CGContextShowGlyphsWithAdvances != NULL)
+#endif
+    {
+      CGContextSetTextPosition (context, gx, gy);
       CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
-    }
-#else
-  for (i = 0; i < nchars; i++)
-    {
-      CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
       if (overstrike_p)
-	CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
-      gx += advances[i].width;
+	{
+	  CGContextSetTextPosition (context, gx + 1.0f, gy);
+	  CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
+	}
+    }
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+  else
+#endif
+#endif	/* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030  */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+    {
+      for (i = 0; i < nchars; i++)
+	{
+	  CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
+	  if (overstrike_p)
+	    CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
+	  gx += advances[i].width;
+	}
     }
 #endif
 #if USE_CG_DRAWING