patch 8.1.1224: MS-Windows: cannot specify font weight
Problem: MS-Windows: cannot specify font weight.
Solution: Add the "W" option to 'guifont'. (closes #4309) Move GUI font
explanation out of options.txt.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 1502fc7..4e0bedd 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3727,91 +3727,8 @@
{not in Vi}
{only available when compiled with GUI enabled}
This is a list of fonts which will be used for the GUI version of Vim.
- In its simplest form the value is just one font name. When
- the font cannot be found you will get an error message. To try other
- font names a list can be specified, font names separated with commas.
- The first valid font is used.
-
- On systems where 'guifontset' is supported (X11) and 'guifontset' is
- not empty, then 'guifont' is not used.
-
- Note: As to the GTK GUIs, no error is given against any invalid names,
- and the first element of the list is always picked up and made use of.
- This is because, instead of identifying a given name with a font, the
- GTK GUIs use it to construct a pattern and try to look up a font which
- best matches the pattern among available fonts, and this way, the
- matching never fails. An invalid name doesn't matter because a number
- of font properties other than name will do to get the matching done.
-
- Spaces after a comma are ignored. To include a comma in a font name
- precede it with a backslash. Setting an option requires an extra
- backslash before a space and a backslash. See also
- |option-backslash|. For example: >
- :set guifont=Screen15,\ 7x13,font\\,with\\,commas
-< will make Vim try to use the font "Screen15" first, and if it fails it
- will try to use "7x13" and then "font,with,commas" instead.
-
- If none of the fonts can be loaded, Vim will keep the current setting.
- If an empty font list is given, Vim will try using other resource
- settings (for X, it will use the Vim.font resource), and finally it
- will try some builtin default which should always be there ("7x13" in
- the case of X). The font names given should be "normal" fonts. Vim
- will try to find the related bold and italic fonts.
-
- For Win32, GTK, Motif, Mac OS and Photon: >
- :set guifont=*
-< will bring up a font requester, where you can pick the font you want.
-
- The font name depends on the GUI used. See |setting-guifont| for a
- way to set 'guifont' for various systems.
-
- For the GTK+ 2 and 3 GUIs, the font name looks like this: >
- :set guifont=Andale\ Mono\ 11
-< That's all. XLFDs are not used. For Chinese this is reported to work
- well: >
- if has("gui_gtk2")
- set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
- set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
- endif
-<
- (Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI)
-
- For Mac OSX you can use something like this: >
- :set guifont=Monaco:h10
-< Also see 'macatsui', it can help fix display problems.
- *E236*
- Note that the fonts must be mono-spaced (all characters have the same
- width). An exception is GTK: all fonts are accepted, but mono-spaced
- fonts look best.
-
- To preview a font on X11, you might be able to use the "xfontsel"
- program. The "xlsfonts" program gives a list of all available fonts.
-
- For the Win32 GUI *E244* *E245*
- - takes these options in the font name:
- hXX - height is XX (points, can be floating-point)
- wXX - width is XX (points, can be floating-point)
- b - bold
- i - italic
- u - underline
- s - strikeout
- cXX - character set XX. Valid charsets are: ANSI, ARABIC,
- BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
- HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
- SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
- Normally you would use "cDEFAULT".
- qXX - quality XX. Valid quality names are: PROOF, DRAFT,
- ANTIALIASED, NONANTIALIASED, CLEARTYPE, DEFAULT.
- Normally you would use "qDEFAULT".
- Some quality values are not supported in legacy OSs.
-
- Use a ':' to separate the options.
- - A '_' can be used in the place of a space, so you don't need to use
- backslashes to escape the spaces.
- - Examples: >
- :set guifont=courier_new:h12:w5:b:cRUSSIAN
- :set guifont=Andale_Mono:h7.5:w4.5
-< See also |font-sizes|.
+ In its simplest form the value is just one font name.
+ See |gui-font| for the details.
*'guifontset'* *'gfs'*
*E250* *E252* *E234* *E597* *E598*
@@ -3824,20 +3741,7 @@
When not empty, specifies two (or more) fonts to be used. The first
one for normal English, the second one for your special language. See
|xfontset|.
- Setting this option also means that all font names will be handled as
- a fontset name. Also the ones used for the "font" argument of the
- |:highlight| command.
- The fonts must match with the current locale. If fonts for the
- character sets that the current locale uses are not included, setting
- 'guifontset' will fail.
- Note the difference between 'guifont' and 'guifontset': In 'guifont'
- the comma-separated names are alternative names, one of which will be
- used. In 'guifontset' the whole string is one fontset name,
- including the commas. It is not possible to specify alternative
- fontset names.
- This example works on many X11 systems: >
- :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*
-<
+
*'guifontwide'* *'gfw'* *E231* *E533* *E534*
'guifontwide' 'gfw' string (default "")
global
@@ -3845,31 +3749,7 @@
{only available when compiled with GUI enabled}
When not empty, specifies a comma-separated list of fonts to be used
for double-width characters. The first font that can be loaded is
- used.
- Note: The size of these fonts must be exactly twice as wide as the one
- specified with 'guifont' and the same height.
-
- All GUI versions but GTK+:
-
- 'guifontwide' is only used when 'encoding' is set to "utf-8" and
- 'guifontset' is empty or invalid.
- When 'guifont' is set and a valid font is found in it and
- 'guifontwide' is empty Vim will attempt to find a matching
- double-width font and set 'guifontwide' to it.
-
- GTK+ GUI only: *guifontwide_gtk*
-
- If set and valid, 'guifontwide' is always used for double width
- characters, even if 'encoding' is not set to "utf-8".
- Vim does not attempt to find an appropriate value for 'guifontwide'
- automatically. If 'guifontwide' is empty Pango/Xft will choose the
- font for characters not available in 'guifont'. Thus you do not need
- to set 'guifontwide' at all unless you want to override the choice
- made by Pango/Xft.
-
- Windows +multibyte only: *guifontwide_win_mbyte*
-
- If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
+ used. See |gui-fontwide|.
*'guiheadroom'* *'ghr'*
'guiheadroom' 'ghr' number (default 50)