]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.210
- initial import
[packages/vim.git] / 6.2.210
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.210 (extra)
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.210 (extra)
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
15
16
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
19 ***************
20 *** 1,4 ****
21 ! *options.txt* For Vim version 6.2.  Last change: 2003 Aug 12
22   
23   
24                   VIM REFERENCE MANUAL    by Bram Moolenaar
25 --- 1,4 ----
26 ! *options.txt* For Vim version 6.2.  Last change: 2004 Jan 22
27   
28   
29                   VIM REFERENCE MANUAL    by Bram Moolenaar
30 ***************
31 *** 619,644 ****
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).
43   
44 !                       *'autochdir'* *'acd'* *'noatuochdir'* *'noacd'*
45   'autochdir' 'acd'     boolean (default off)
46                         global
47                         {not in Vi}
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
55         Enterprise Edition.
56   
57                                 *'arabic'* *'arab'* *'noarabic'* *'noarab'*
58 --- 621,658 ----
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).
70   
71 !                       *'antialias'* *'anti'* *'noantialias'* *'noanti'*
72 ! 'antialias' 'anti'    boolean (default: off)
73 !                       global
74 !                       {not in Vi}
75 !                       {only available when compiled with GUI enabled
76 !                         on Mac OS X}
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).
82
83 !                       *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
84   'autochdir' 'acd'     boolean (default off)
85                         global
86                         {not in Vi}
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
94         Enterprise Edition.
95   
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
99 ***************
100 *** 2794,2799 ****
101 --- 2850,2861 ----
102       gui.scrollbar_height = gui.scrollbar_width = 15; /* cheat 1 overlap */
103       gui.border_offset = gui.border_width = 2;
104   
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");
109 + #endif
110
111       /* TODO: Load bitmap if using TOOLBAR */
112       return OK;
113   }
114 ***************
115 *** 3265,3295 ****
116       int               len;
117       int               flags;
118   {
119 -     TextMode (srcCopy);
120 -     TextFace (normal);
121   
122 ! /*  SelectFont(hdc, gui.currFont); */
123   
124 !     if (flags & DRAW_TRANSP)
125       {
126 !       TextMode (srcOr);
127       }
128   
129 !     MoveTo (TEXT_X(col), TEXT_Y(row));
130 !     DrawText ((char *)s, 0, len);
131   
132   
133 !     if (flags & DRAW_BOLD)
134 !     {
135 !       TextMode (srcOr);
136 !       MoveTo (TEXT_X(col) + 1, TEXT_Y(row));
137         DrawText ((char *)s, 0, len);
138 -     }
139   
140 !     if (flags & DRAW_UNDERL)
141 !     {
142 !       MoveTo (FILL_X(col), FILL_Y(row + 1) - 1);
143 !       LineTo (FILL_X(col + len) - 1, FILL_Y(row + 1) - 1);
144       }
145   }
146   
147 --- 3327,3411 ----
148       int               len;
149       int               flags;
150   {
151   
152 ! #if defined(FEAT_GUI) && defined(MACOS_X)
153 !     /*
154 !      * On OS X, try using Quartz-style text antialiasing.
155 !      */
156 !     SInt32 sys_version = 0;
157   
158 !     Gestalt(gestaltSystemVersion, &sys_version);
159 !     if (sys_version >= 0x1020)
160       {
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);
165 !     }
166
167 !     if (sys_version >= 0x1020 && p_antialias)
168 !     {
169 !         StyleParameter face;
170
171 !         face = normal;
172 !         if (flags & DRAW_BOLD)
173 !             face |= bold;
174 !         if (flags & DRAW_UNDERL)
175 !             face |= underline;
176 !         TextFace(face);
177
178 !         /* Quartz antialiasing works only in srcOr transfer mode. */
179 !         TextMode(srcOr);
180
181 !         if (!(flags & DRAW_TRANSP))
182 !         {
183 !             /*
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.
188 !              */
189 !             Rect rc;
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);
194 !             EraseRect(&rc);
195 !         }
196
197 !         MoveTo(TEXT_X(col), TEXT_Y(row));
198 !         DrawText((char*)s, 0, len);
199       }
200 +     else
201 + #endif
202 +     {
203 +       /* Use old-style, non-antialiased QuickDraw text rendering. */
204 +       TextMode (srcCopy);
205 +       TextFace (normal);
206   
207 !     /*  SelectFont(hdc, gui.currFont); */
208   
209 +       if (flags & DRAW_TRANSP)
210 +       {
211 +           TextMode (srcOr);
212 +       }
213   
214 !       MoveTo (TEXT_X(col), TEXT_Y(row));
215         DrawText ((char *)s, 0, len);
216   
217
218 !       if (flags & DRAW_BOLD)
219 !       {
220 !           TextMode (srcOr);
221 !           MoveTo (TEXT_X(col) + 1, TEXT_Y(row));
222 !           DrawText ((char *)s, 0, len);
223 !       }
224
225 !       if (flags & DRAW_UNDERL)
226 !       {
227 !           MoveTo (FILL_X(col), FILL_Y(row + 1) - 1);
228 !           LineTo (FILL_X(col + len) - 1, FILL_Y(row + 1) - 1);
229 !       }
230       }
231   }
232   
233 ***************
234 *** 4045,4050 ****
235 --- 4161,4167 ----
236         int         key = 0;
237         int         modifiers = 0;
238         char_u      *p_actext;
239
240         p_actext = menu->actext;
241         key = find_special_key(&p_actext, &modifiers, /*keycode=*/0);
242         if (*p_actext != 0)
243 ***************
244 *** 5110,5116 ****
245   #if defined(FEAT_CW_EDITOR) || defined(PROTO)
246   /* TODO: Is it need for MACOS_X? (Dany) */
247       void
248 ! mch_post_buffer_write (buf_T *buf)
249   {
250   # ifdef USE_SIOUX
251       printf ("Writing Buf...\n");
252 --- 5227,5233 ----
253   #if defined(FEAT_CW_EDITOR) || defined(PROTO)
254   /* TODO: Is it need for MACOS_X? (Dany) */
255       void
256 ! mch_post_buffer_write(buf_T *buf)
257   {
258   # ifdef USE_SIOUX
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
262 ***************
263 *** 290,295 ****
264 --- 290,298 ----
265   #ifdef FEAT_MBYTE
266   EXTERN char_u *p_ambw;        /* 'ambiwidth' */
267   #endif
268 + #if defined(FEAT_GUI) && defined(MACOS_X)
269 + EXTERN int    *p_antialias;   /* 'antialias' */
270 + #endif
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
276 ***************
277 *** 320,325 ****
278 --- 320,334 ----
279                             (char_u *)224L,
280   #endif
281                                             (char_u *)0L}},
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}
286 + #else
287 +                           (char_u *)NULL, PV_NONE,
288 +                           {(char_u *)FALSE, (char_u *)FALSE}
289 + #endif
290 +                             },
291       {"arabic",            "arab", P_BOOL|P_VI_DEF|P_VIM,
292   #ifdef FEAT_ARABIC
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
296 ***************
297 *** 639,640 ****
298 --- 639,642 ----
299   {   /* Add new patch number below this line */
300 + /**/
301 +     210,
302   /**/
303
304 -- 
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),
309                   BROTHER MAYNARD
310                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
311
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  ///
This page took 0.042159 seconds and 3 git commands to generate.