ashersyed / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Trouble getting bold fonts #306

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I seem unable to get bold fonts to display in MacVim. I'm using the latest 
snapshot with the 'Experimental Text Renderer" turned on, on 10.6.x. Everything 
works fine but the editor doesn't seem to be honouring my 'gui=bold' settings 
in my colorscheme file.

I have tried various fonts for legibility etc and always come back to ProFontX 
at 9 px with antialiasing turned off:

set noanti
set gfn=ProFontX:h9

When I remove this setting in my .vimrc file I see bold fonts but the text is 
unusably bad (I have no idea what the default font is but it's a bit weird).

So, how can I get the combination of a workable/readable font & bold text? I'm 
sure this used to work before the new text rendering system, although turning 
off the experimental renderer doesn't fix the problem.

Just FYI here is the list of fonts that I've tried, none of which show up as 
bold:

set gfn=ProFontX:h9
set gfn=ProFontWindows:h11
set gfn=Andale\ Mono:h10
set gfn=Monaco:h9
set gfn=ProFontIsoLatin1:h9
set gfn=Inconsolata:h11
set gfn=Liberation\ Mono\ Regular:h10
set gfn=Liberation\ Mono\ Regular:h10
set gfn=Droid\ Sans\ Mono:h9
set gfn=MonteCarlo:h11

However the following does give me bold text:

set gfn=Liberation\ Mono\ Regular:h11

(but is too big for me)

I've attached my ProFontX file (which I believe is open source/free) in case 
that helps.

Is anyone else seeing this? Any ideas?

Thanks in advance,

Garry

Original issue reported on code.google.com by magneti...@gmail.com on 2 Dec 2010 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
Have you made sure that those fonts come with bold variants? (You can check in 
Font Book.)

Note that MacVim does not "fake" bold when there is no bold font variant 
available, it simply displays them non-bold.

Original comment by bjorn.winckler@gmail.com on 3 Dec 2010 at 2:01

GoogleCodeExporter commented 9 years ago
Hi Bjorn,

Thanks for the tip. I assumed that MacVim would be faking the bold fonts 
because the same fonts used to appear as bold but then stopped.

There aren't many programming fonts that come with a bold variant, even 
standards like Monaco are Regular only. I've ended up with Menlo, which does 
have bold.

Any chance of a fake bold implementation??

Thanks,

Garry

Original comment by magneti...@gmail.com on 6 Dec 2010 at 12:30

GoogleCodeExporter commented 9 years ago
Perhaps the old ATSUI renderer faked bold (I can't remember) but this has been 
deprecated.

It is a shame that so many fonts are missing bold variants - I will put a note 
in my todo list to see if I can get faked bold working.

Original comment by bjorn.winckler@gmail.com on 9 Dec 2010 at 3:06

GoogleCodeExporter commented 9 years ago
I think it did.

That would be absolutely fantastic, thanks!

Original comment by magneti...@gmail.com on 9 Dec 2010 at 3:38

GoogleCodeExporter commented 9 years ago
+1 Please add bold support for programming fonts.

Original comment by viktorov...@gmail.com on 18 Jan 2011 at 12:57

GoogleCodeExporter commented 9 years ago
I have not been able to find any built-in mechanism for faking bold in Mac OS X 
so the only way I can think of doing it would be rendering the text twice, the 
second time offset by one pixel.  However, this will require more time than I 
have available right now.

If anybody stumbles onto this issue and knows a simple way (as in "there's an 
API for that (c)") to get faked bold, please let me know.

By the way: the ATSUI did not fake bold either (I checked).

Original comment by bjorn.winckler@gmail.com on 19 Jan 2011 at 10:12

GoogleCodeExporter commented 9 years ago
In the meantime, for the Inconsolata lovers there is a bold version that works 
well enough for most purposes:
http://www.bitcetera.com/en/techblog/2009/10/09/inconsolata-xl-font

Original comment by dmitryki...@gmail.com on 28 Jul 2011 at 4:55

GoogleCodeExporter commented 9 years ago
I don't know of an API that does this, but I can add that for anti-aliased 
fonts it is enough to render twice, without a pixel offset. That's how iTerm2 
does it -- see the attached source file (search for 'fakeBold').

Original comment by guygur...@gmail.com on 8 Sep 2011 at 10:21

Attachments:

GoogleCodeExporter commented 9 years ago
I'd like to see iTerm2's "fakeBold" approach utilized. It works well in iTerm2.

Original comment by zachkell...@gmail.com on 3 Oct 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Here is a Monaco font with a Bold variant just for the record:

https://github.com/vjpr/monaco-bold

Original comment by vroues...@gmail.com on 9 Jun 2013 at 2:49