"A.J.Mechelynck" <[EMAIL PROTECTED]> wrote on 2006.07.31
01:17:38:

> Dr. Johannes Zellner wrote:
> > Hello,
> >
> > Apparently, there are only very few monospaced unicode fonts in Windows
> > which can be used with vim.
> >
> > On Linux I like to use for example the efont unicode font for xterm.
> > I installed this font as a ttf file on Windows, but it doesn't appear
> > in the vim font selection dialog. I seems that there are fonts (with
the
> > .ttf suffix for the font file) wich appear on the vim font selection
> > dialog (for example "Courier New") and some which don't.
> >
> > 1. Can I make the efont ttf font available for vim on Windows?
> > 2. More generally: is there a way to convert Linux fonts (e.g. from bdf
> > or pcf) to windows fonts which can be used with vim? I'm especially
> > interested in unicode (iso10646-1) fonts.
> >
> > Any help much appreciated.
> >
>
> I don't know how to import fonts, or from where, but while editing in
> Unicode I have found that:
>
> - The Windows Courier_New font has, at least, glyphs for Latin, Cyrillic
> and Arabic. Probably some others too. I use it on Windows for Unicode,
> except with CJK (i.e., Chinese-Japanese-Korean).
>
> - If you want fonts with CJK glyphs, there are several listed in the
> fonts dialog. Those with @ prepended are rotated fonts, used to print
> ideograms in such way that they will appear in columns after rotating
> the paper 90° clockwise. Fonts with the same names but without the @ are
> used to print ideograms in successive lines, as with Latin. The Chinese
> (traditional), Chinese (simplified) and Japanese fonts have many glyphs
> in common; I think some can be used for all three (MingLiU ? Can't check
> at the moment as I'm currently on Linux).
>
> - I recommend leaving the :c part of the 'guifont' option at DEFAULT so
> gvim will be able to get the necessary font where it is available: e.g.
>
>    :set guifont=Courier_New:h14:cDEFAULT
>
> - If you have, let's say, Arabic and Chinese in a single document (like
> my frontpage http://users.skynet.be/antoine.mechelynck/index.htm ) you
> may need to set 'guifont' to Courier_New or to a CJK font depending on
> which part of the file you're currently editing. It is of course
> possible to map it to a single-key shortcut such as:
>
>    :map <F6> :if &gfn =~ "Courier" <Bar> set gfn=MingLiU:h16:cDEFAULT
> <Bar> else <Bar> set gfn=Courier_New:h12:cDEFAULT <Bar> endif <Bar> set
> lines=999 columns=999<CR>
>
>    :map! <F6> <C-O>:if &gfn =~ "Courier" <Bar> set
> gfn=MingLiU:h16:cDEFAULT <Bar> else <Bar> set
> gfn=Courier_New:h12:cDEFAULT <Bar> endif <Bar> set lines=999
columns=999<CR>
>
> (each mapping on a single line)
>
>
> Best regards,
> Tony.

Vim can use only fixed width fonts. Some fonts appears to be fixed-width,
but Vim cannot recognize it.

Usually, fonts such as Courier_New does NOT look very well for unicode,
since the height/width ratio of the alphabet characters in it is no way
near 2:1. And the CJK characters in such font would be distorted or
streched. in some cases the Font can be too small or too thin to read.

The secret is that you can use different font for double-width characters,
and that would not shown in the "Vim Font Select Dialog", you can safely
set gfw= to many fonts which were NOT shown in the Font select Dialog.

Tips: When you need to display double-width characters, try choose font
which has a h/w ratio near 2:1 for alphabet,

--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to