1. equalsraf
  2. vim-qt
  3. Issues
Issue #58 new

Add support for custom font replacements for bold/italic typefaces

repo owner created an issue

After a very insightfull discussion in IRC, setog3 came up with this interesting feature request. It seems the Motif GUI has the ability to use different entirely fonts instead of typefaces for the same font (:he gui-ressources).

So for example we could: {{{ :set guifontBold=Arial 13 }}}

would override the bold font into a completely different font, and similarly for Italic/BoldItalic.

A few points to get this started: This could only work with slow text painting method, otherwise it would be impossible to layout the text correctly The font dimensions Vim uses for the char grid would still be static, instead we could (for example) use the size of the largest font. Ideally all fonts would have the same size. * If the fonts are too different(in size or otherwise) - bad things will happen.

This shouldn't be too hard. We would have to:

Add some options to set the additional fonts

Change the font size calculations to take all fonts into consideration - or adopt some other strategy?

Set the text drawing to the slow mode whenever these options were selected.

Change gui_qt.cpp:gui_mch_draw_string_slow() to pass the new fonts.

This is partially related to issue #55 in that both provide a custom replacement method for bold/italic fonts - we should be carefull so that these two features don't get in each others way.

Comments (0)

  1. Log in to comment