diff options
| author | Steven Tamm | 2005-01-16 00:31:53 +0000 |
|---|---|---|
| committer | Steven Tamm | 2005-01-16 00:31:53 +0000 |
| commit | 743d0696815e14252284e5b11ba7f40feeb652c9 (patch) | |
| tree | cdaa10214a211cc3136c215267eca2ef0ccc55b1 /src | |
| parent | 42afbcda13137806a3fd51c466526e29026947b9 (diff) | |
| download | emacs-743d0696815e14252284e5b11ba7f40feeb652c9.tar.gz emacs-743d0696815e14252284e5b11ba7f40feeb652c9.zip | |
* macterm.c (Vmac_use_core_graphics): defined
(syms_of_macterm): Added mac-use-core-graphics
(mac_draw_string_common): Use core graphics text rendering if
mac-use-core-graphics is enabled.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/macterm.c | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a8dd700f7d5..6f67d5e49fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2005-01-15 Steven Tamm <steventamm@mac.com> | 1 | 2005-01-15 Steven Tamm <steventamm@mac.com> |
| 2 | 2 | ||
| 3 | * macterm.c (Vmac_use_core_graphics): defined | ||
| 4 | (syms_of_macterm): Added mac-use-core-graphics | ||
| 5 | (mac_draw_string_common): Use core graphics text rendering if | ||
| 6 | mac-use-core-graphics is enabled. | ||
| 7 | |||
| 3 | * macfns.c (Fx_file_dialog): Save As dialog includes only the | 8 | * macfns.c (Fx_file_dialog): Save As dialog includes only the |
| 4 | file name in the text box. | 9 | file name in the text box. |
| 5 | 10 | ||
diff --git a/src/macterm.c b/src/macterm.c index 0dc530cda8e..4a1593309ba 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -101,6 +101,10 @@ Boston, MA 02111-1307, USA. */ | |||
| 101 | 101 | ||
| 102 | Lisp_Object Vx_toolkit_scroll_bars; | 102 | Lisp_Object Vx_toolkit_scroll_bars; |
| 103 | 103 | ||
| 104 | /* If Non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */ | ||
| 105 | Lisp_Object Vmac_use_core_graphics; | ||
| 106 | |||
| 107 | |||
| 104 | /* Non-zero means that a HELP_EVENT has been generated since Emacs | 108 | /* Non-zero means that a HELP_EVENT has been generated since Emacs |
| 105 | start. */ | 109 | start. */ |
| 106 | 110 | ||
| @@ -725,6 +729,13 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, | |||
| 725 | int nchars, mode, bytes_per_char; | 729 | int nchars, mode, bytes_per_char; |
| 726 | { | 730 | { |
| 727 | SetPortWindowPort (w); | 731 | SetPortWindowPort (w); |
| 732 | #ifdef MAC_OSX | ||
| 733 | UInt32 textFlags, savedFlags; | ||
| 734 | if (!NILP(Vmac_use_core_graphics)) { | ||
| 735 | textFlags = kQDUseCGTextRendering; | ||
| 736 | savedFlags = SwapQDTextFlags(textFlags); | ||
| 737 | } | ||
| 738 | #endif | ||
| 728 | 739 | ||
| 729 | mac_set_colors (gc); | 740 | mac_set_colors (gc); |
| 730 | 741 | ||
| @@ -735,6 +746,10 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, | |||
| 735 | 746 | ||
| 736 | MoveTo (x, y); | 747 | MoveTo (x, y); |
| 737 | DrawText (buf, 0, nchars * bytes_per_char); | 748 | DrawText (buf, 0, nchars * bytes_per_char); |
| 749 | #ifdef MAC_OSX | ||
| 750 | if (!NILP(Vmac_use_core_graphics)) | ||
| 751 | SwapQDTextFlags(savedFlags); | ||
| 752 | #endif | ||
| 738 | } | 753 | } |
| 739 | 754 | ||
| 740 | 755 | ||
| @@ -9901,8 +9916,17 @@ Toolbox for processing before Emacs sees it. */); | |||
| 9901 | doc: /* If non-nil, the Mac \"Control\" key is passed on to the Mac | 9916 | doc: /* If non-nil, the Mac \"Control\" key is passed on to the Mac |
| 9902 | Toolbox for processing before Emacs sees it. */); | 9917 | Toolbox for processing before Emacs sees it. */); |
| 9903 | Vmac_pass_control_to_system = Qt; | 9918 | Vmac_pass_control_to_system = Qt; |
| 9919 | |||
| 9920 | DEFVAR_LISP ("mac-pass-control-to-system", &Vmac_pass_control_to_system, | ||
| 9921 | doc: /* If non-nil, the Mac \"Control\" key is passed on to the Mac | ||
| 9922 | Toolbox for processing before Emacs sees it. */); | ||
| 9923 | Vmac_pass_control_to_system = Qt; | ||
| 9904 | #endif | 9924 | #endif |
| 9905 | 9925 | ||
| 9926 | DEFVAR_LISP ("mac-use-core-graphics", &Vmac_use_core_graphics, | ||
| 9927 | doc: /* If non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */); | ||
| 9928 | Vmac_use_core_graphics = Qnil; | ||
| 9929 | |||
| 9906 | DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, | 9930 | DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, |
| 9907 | doc: /* One of the Text Encoding Base constant values defined in the | 9931 | doc: /* One of the Text Encoding Base constant values defined in the |
| 9908 | Basic Text Constants section of Inside Macintosh - Text Encoding | 9932 | Basic Text Constants section of Inside Macintosh - Text Encoding |