Italic and other variant fonts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Italic and other variant fonts

Robert Goulding
I have my own little syntax file for various notes; it makes copious
use of bold, italic and bold-italic.  When I use GTK vim on OS X, this
all works out fine; but Vim.app is unable to find the Italic and
Bold-italic variants of the guifont; instead they come out as
underlined.  (At the moment I'm using Courier New, for which these
variants do exist).  Is there anything I can do to help Vim.app
recognize these variants, or is this a (current?) limitation of the OS
X port?

Thanks!
Robert.

Reply | Threaded
Open this post in threaded view
|

Re: Italic and other variant fonts

Jussi Hagman
Quoting Robert Goulding ([hidden email]):
> Is there anything I can do to help Vim.app recognize these variants,
> or is this a (current?) limitation of the OS X port?

It seems that italic works only on RISCOS and GTK2. (according to gui.h)
So there is not much you can do without touching the code.

I'll add this to my buglist and I'll look into it when I find the time
to learn autotools and do some coding..


Greetings,
Jussi


--
Jussi Hagman, [hidden email], iChat/AIM: jussihagman, ICQ: 54004113
Studentbyn 4 D 33, 20540 ?bo, Finland +358 50 56 51 170
Reply | Threaded
Open this post in threaded view
|

Re: Italic and other variant fonts

Jussi Hagman
In reply to this post by Robert Goulding
Quoting Robert Goulding ([hidden email]):
> Is there anything I can do to help Vim.app recognize these variants,
> or is this a (current?) limitation of the OS X port?

Here is a small patch that fixes the limitation. It has not been tested
enough, it could result some rendering problems, but you can try it. The
patch is applied as instructed here[1].

The minimal patch enables italic only using anti-aliased Carbon
rendering, it does not change aliased rendering.  I'm not 100% sure if
the changes to ifdefs are as they should be (FEAT_GUI_MAC).  

I guess we should make the split between OS X and classic sources.  I'm
not familiar with autotools at all. Could Bram, or someone who knows
more about them, tell what changes are needed to the build process so
that we could make the split?

Greetings,
Jussi

[1] http://www.vim.org/patches.php

--
Jussi Hagman, [hidden email], iChat/AIM: jussihagman, ICQ: 54004113
Studentbyn 4 D 33, 20540 ?bo, Finland +358 50 56 51 170

italic.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Italic and other variant fonts

Robert Goulding

On Jul 20, 2005, at 10:50 AM, Jussi Hagman wrote:

> Quoting Robert Goulding ([hidden email]):
>> Is there anything I can do to help Vim.app recognize these variants,
>> or is this a (current?) limitation of the OS X port?
>
> Here is a small patch that fixes the limitation. It has not been tested
> enough, it could result some rendering problems, but you can try it.
> The
> patch is applied as instructed here[1].
>
> The minimal patch enables italic only using anti-aliased Carbon
> rendering, it does not change aliased rendering.  I'm not 100% sure if
> the changes to ifdefs are as they should be (FEAT_GUI_MAC).
>
Applied to latest CVS - this works fine, so long as linespace is set to
0.  When it is set to some other number, the italicized text leaves
'trails' behind it.  ISTR there was the same display problem with
linespace in the Carbon GUI some time back, which was fixed in the CVS
- this patch seems to re-awaken it.  But apart from that it is lovely!

Robert.