On 07/03/10 08:51, Dotan Cohen wrote:
Well, when I'm about to edit Arabic text (or the Arabic part of a
multilingual page) I just do ":set gfn=Courier\ New\ 10" (using the GTK2
format, because that's how my current gvim was compiled); similarly ":set
gfn=FZKaiTi\ 16" (without the quotes in both cases, of course, as well as
the next one) for Chinese, and ":set gfn=Bitstream\ Vera\ Sans\ Mono\ 8" to
go back to Latin. Nothing fancy. I could write functions, commands or
mappings to automate it, but in this case I think the game isn't worth the
candle.


Thanks, Tony. I though that you meant that, for instance, Arabic would
show in font X and Latin might show in font Y. That would be a treat!
It could probably be done on a unicode-blocks level.



No, that's not possible: Vim relies on character cells all the same size, with the top and bottom of letters such as x at the same height, which in turn means a single font all over. Normal, Italic, Bold and BoldItalic are considered "the same font" for this purpose, which leads to problems when, for instance, bold Cyrillic glyphs of a font (such as Lucida Console) are one pixel wider than their non-bold counterparts.

The GTK2 version of gvim will accept to set 'guifont' to a proportional font, and it will also fetch missing glyphs from whatever "likely" font has them, but the results are usually ugly, because thin letters such as lowercase L are surrounded with blank space while fat letters like m are clipped at the character-cell border, and glyphs from different fonts don't look good next to one another.

'guifont' can be set to a comma-separated list of fonts, but IIUC gvim globally uses the first installed font in the list, unlike the HTML rendering engine of your browser, which, for each character, uses the first installed font in the list (of <font face="list"> or of <span style="font-family: list">) which has a glyph for it.

Best regards,
Tony.
--
It is very difficult to prophesy, especially when it pertains to the
future.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to