emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macterm.c


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/macterm.c
Date: Sat, 19 Nov 2005 01:35:19 -0500

Index: emacs/src/macterm.c
diff -c emacs/src/macterm.c:1.143 emacs/src/macterm.c:1.144
*** emacs/src/macterm.c:1.143   Sun Nov 13 05:46:52 2005
--- emacs/src/macterm.c Sat Nov 19 06:35:19 2005
***************
*** 867,872 ****
--- 867,885 ----
  #if USE_CG_TEXT_DRAWING
  static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *));
  
+ static int cg_text_anti_aliasing_threshold = 8;
+ 
+ static void
+ init_cg_text_anti_aliasing_threshold ()
+ {
+   Lisp_Object val =
+     Fmac_get_preference (build_string ("AppleAntiAliasingThreshold"),
+                        Qnil, Qnil, Qnil);
+ 
+   if (INTEGERP (val))
+     cg_text_anti_aliasing_threshold = XINT (val);
+ }
+ 
  static int
  mac_draw_string_cg (f, gc, x, y, buf, nchars)
       struct frame *f;
***************
*** 915,920 ****
--- 928,935 ----
                            1.0);
    CGContextSetFont (context, GC_FONT (gc)->cg_font);
    CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize);
+   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);
***************
*** 6784,6789 ****
--- 6799,6807 ----
    text_encoding_info_alist = create_text_encoding_info_alist ();
  
  #if USE_ATSUI
+ #if USE_CG_TEXT_DRAWING
+   init_cg_text_anti_aliasing_threshold ();
+ #endif
    if (!NILP (assq_no_quit (make_number (kTextEncodingMacUnicode),
                           text_encoding_info_alist)))
      {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]