2 Subject: Patch 6.2.210 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Mac OSX: antialiased fonts are not supported.
12 Solution: Add the 'antialias' option to switch on antialiasing on Mac OSX
13 10.2 and later. (Peter Cucka)
14 Files: runtime/doc/options.txt, src/gui_mac.c, src/option.h, src/option.c
17 *** ../vim-6.2.209/runtime/doc/options.txt Tue Aug 12 20:01:59 2003
18 --- runtime/doc/options.txt Thu Jan 22 10:47:26 2004
21 ! *options.txt* For Vim version 6.2. Last change: 2003 Aug 12
24 VIM REFERENCE MANUAL by Bram Moolenaar
26 ! *options.txt* For Vim version 6.2. Last change: 2004 Jan 22
29 VIM REFERENCE MANUAL by Bram Moolenaar
32 Registered sign, Greek/Cyrillic letters are represented by two octets,
33 therefore those fonts have "wide" glyphs for them. This is also
34 true of some line drawing characters used to make tables in text
35 ! file. Therefore, when a CJK font is used for GUI vim or
36 ! vim is running inside a terminal (emulators) that uses a CJK font
37 ! (or vim is run inside an xterm invoked with "-cjkwidth" option.),
38 this option should be set to "double" to match the width perceived
39 by Vim with the width of glyphs in the font. Perhaps it also has
40 to be set to "double" under CJK Windows 9x/ME or Windows 2k/XP
41 when the system locale is set to one of CJK locales. See Unicode
42 Standard Annex #11 (http://www.unicode.org/reports/tr11).
44 ! *'autochdir'* *'acd'* *'noatuochdir'* *'noacd'*
45 'autochdir' 'acd' boolean (default off)
48 {only available when compiled with the
49 |+netbeans_intg| or |+sun_workshop| feature}
50 ! When on, vim will change its value for the current working directory
51 whenever you open a file, switch buffers, delete a buffer or
52 open/close a window. It will change to the directory containing the
53 file which was opened or selected. This option is provided for
54 ! backward compatibility with the vim released with Sun ONE Studio 4
57 *'arabic'* *'arab'* *'noarabic'* *'noarab'*
59 Registered sign, Greek/Cyrillic letters are represented by two octets,
60 therefore those fonts have "wide" glyphs for them. This is also
61 true of some line drawing characters used to make tables in text
62 ! file. Therefore, when a CJK font is used for GUI Vim or
63 ! Vim is running inside a terminal (emulators) that uses a CJK font
64 ! (or Vim is run inside an xterm invoked with "-cjkwidth" option.),
65 this option should be set to "double" to match the width perceived
66 by Vim with the width of glyphs in the font. Perhaps it also has
67 to be set to "double" under CJK Windows 9x/ME or Windows 2k/XP
68 when the system locale is set to one of CJK locales. See Unicode
69 Standard Annex #11 (http://www.unicode.org/reports/tr11).
71 ! *'antialias'* *'anti'* *'noantialias'* *'noanti'*
72 ! 'antialias' 'anti' boolean (default: off)
75 ! {only available when compiled with GUI enabled
77 ! This option only has an effect in the GUI version of Vim on Mac OS X
78 ! v10.2 or later. When on, Vim will use smooth ("antialiased") fonts,
79 ! which can be easier to read at certain sizes on certain displays.
80 ! Setting this option can sometimes cause problems if |guifont| is set
81 ! to its default (empty string).
83 ! *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
84 'autochdir' 'acd' boolean (default off)
87 {only available when compiled with the
88 |+netbeans_intg| or |+sun_workshop| feature}
89 ! When on, Vim will change its value for the current working directory
90 whenever you open a file, switch buffers, delete a buffer or
91 open/close a window. It will change to the directory containing the
92 file which was opened or selected. This option is provided for
93 ! backward compatibility with the Vim released with Sun ONE Studio 4
96 *'arabic'* *'arab'* *'noarabic'* *'noarab'*
97 *** ../vim-6.2.209/src/gui_mac.c Sun Nov 2 15:27:37 2003
98 --- src/gui_mac.c Thu Jan 22 10:44:31 2004
102 gui.scrollbar_height = gui.scrollbar_width = 15; /* cheat 1 overlap */
103 gui.border_offset = gui.border_width = 2;
105 + #if defined(FEAT_GUI) && defined(MACOS_X)
106 + /* If Quartz-style text antialiasing is available (see
107 + gui_mch_draw_string() below), enable it for all font sizes. */
108 + vim_setenv((char_u *)"QDTEXT_MINSIZE", (char_u *)"1");
111 /* TODO: Load bitmap if using TOOLBAR */
119 - TextMode (srcCopy);
122 ! /* SelectFont(hdc, gui.currFont); */
124 ! if (flags & DRAW_TRANSP)
129 ! MoveTo (TEXT_X(col), TEXT_Y(row));
130 ! DrawText ((char *)s, 0, len);
133 ! if (flags & DRAW_BOLD)
136 ! MoveTo (TEXT_X(col) + 1, TEXT_Y(row));
137 DrawText ((char *)s, 0, len);
140 ! if (flags & DRAW_UNDERL)
142 ! MoveTo (FILL_X(col), FILL_Y(row + 1) - 1);
143 ! LineTo (FILL_X(col + len) - 1, FILL_Y(row + 1) - 1);
152 ! #if defined(FEAT_GUI) && defined(MACOS_X)
154 ! * On OS X, try using Quartz-style text antialiasing.
156 ! SInt32 sys_version = 0;
158 ! Gestalt(gestaltSystemVersion, &sys_version);
159 ! if (sys_version >= 0x1020)
161 ! /* Quartz antialiasing is available only in OS 10.2 and later. */
162 ! UInt32 qd_flags = (p_antialias ?
163 ! kQDUseCGTextRendering | kQDUseCGTextMetrics : 0);
164 ! (void)SwapQDTextFlags(qd_flags);
167 ! if (sys_version >= 0x1020 && p_antialias)
169 ! StyleParameter face;
172 ! if (flags & DRAW_BOLD)
174 ! if (flags & DRAW_UNDERL)
178 ! /* Quartz antialiasing works only in srcOr transfer mode. */
181 ! if (!(flags & DRAW_TRANSP))
184 ! * Since we're using srcOr mode, we have to clear the block
185 ! * before drawing the text. The following is like calling
186 ! * gui_mch_clear_block(row, col, row, col + len - 1),
187 ! * but without setting the bg color to gui.back_pixel.
190 ! rc.left = FILL_X(col);
191 ! rc.top = FILL_Y(row);
192 ! rc.right = FILL_X(col + len) + (col + len == Columns);
193 ! rc.bottom = FILL_Y(row + 1);
197 ! MoveTo(TEXT_X(col), TEXT_Y(row));
198 ! DrawText((char*)s, 0, len);
203 + /* Use old-style, non-antialiased QuickDraw text rendering. */
204 + TextMode (srcCopy);
207 ! /* SelectFont(hdc, gui.currFont); */
209 + if (flags & DRAW_TRANSP)
214 ! MoveTo (TEXT_X(col), TEXT_Y(row));
215 DrawText ((char *)s, 0, len);
218 ! if (flags & DRAW_BOLD)
221 ! MoveTo (TEXT_X(col) + 1, TEXT_Y(row));
222 ! DrawText ((char *)s, 0, len);
225 ! if (flags & DRAW_UNDERL)
227 ! MoveTo (FILL_X(col), FILL_Y(row + 1) - 1);
228 ! LineTo (FILL_X(col + len) - 1, FILL_Y(row + 1) - 1);
240 p_actext = menu->actext;
241 key = find_special_key(&p_actext, &modifiers, /*keycode=*/0);
245 #if defined(FEAT_CW_EDITOR) || defined(PROTO)
246 /* TODO: Is it need for MACOS_X? (Dany) */
248 ! mch_post_buffer_write (buf_T *buf)
251 printf ("Writing Buf...\n");
253 #if defined(FEAT_CW_EDITOR) || defined(PROTO)
254 /* TODO: Is it need for MACOS_X? (Dany) */
256 ! mch_post_buffer_write(buf_T *buf)
259 printf ("Writing Buf...\n");
260 *** ../vim-6.2.209/src/option.h Sun Jan 18 23:21:49 2004
261 --- src/option.h Thu Jan 22 10:37:55 2004
266 EXTERN char_u *p_ambw; /* 'ambiwidth' */
268 + #if defined(FEAT_GUI) && defined(MACOS_X)
269 + EXTERN int *p_antialias; /* 'antialias' */
271 EXTERN int p_ar; /* 'autoread' */
272 EXTERN int p_aw; /* 'autowrite' */
273 EXTERN int p_awa; /* 'autowriteall' */
274 *** ../vim-6.2.209/src/option.c Sun Jan 18 20:58:01 2004
275 --- src/option.c Thu Jan 22 10:39:02 2004
282 + {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
283 + #if defined(FEAT_GUI) && defined(MACOS_X)
284 + (char_u *)&p_antialias, PV_NONE,
285 + {(char_u *)FALSE, (char_u *)FALSE}
287 + (char_u *)NULL, PV_NONE,
288 + {(char_u *)FALSE, (char_u *)FALSE}
291 {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM,
293 (char_u *)VAR_WIN, PV_ARAB,
294 *** ../vim-6.2.209/src/version.c Sun Jan 25 20:37:29 2004
295 --- src/version.c Sun Jan 25 20:39:47 2004
299 { /* Add new patch number below this line */
305 ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
306 KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
307 HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
308 LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
310 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
312 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
313 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
314 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
315 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///