On Sun, Sep 24, 2006 at 02:16:27AM +0100, Edd Barrett wrote:
> >>
> >> I beg you, please don't hardcode Courier New!
> >
> >Hear, hear!
> >
> >> Not only is it the worst possible monospaced screen font, it is also
> >> Microsoft specific (in spite of it finding its way onto Tony's Linux
> >> box). (Even Microsoft has seen the light, and changed the default
> >> monospaced font to Consolas in Windows Vista.)
> >>
> >> The proper thing to do is to only list "font-family: monospace".
> >> That will use the default monospaced font on any platform, which is
> >> Courier New by default in any case on current Windows browsers. Only
> >> people who have consciously chosen to change their monospaced font
> >> (and people on non-Windows platforms) will not see Courier New.
> >
> >It's not just the proper way, it's the first thing discussed in the
> >specification:
> >
> >  http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification
> 
> Again
> 
> ...
> 
> 
> I await a decision

     Does that mean that you are waiting for Bram to give his blessing?
IMHO that is not necessary, since the consensus seems to clear.  Do not
hard code any font.  The simple solution is to leave it at "monospace".
If you, as the author of the patch, are willing to add a few lines of
code, you could check for the existence of a global variable in order to
give the user a little more control.  Something like

if exists("g:2html_font")
  let s:msfont = g:2html_font . ", monospace"
else
  let s:msfont = "monospace"
endif

or the more compact

let s:msfont = (exists("g:2html_font") ? g:2html_font . ", " : "") . "monospace"

and then use the s:msfont variable later in the script.  Then, the
occasional user who cares can either set

let g:2html_font = "myFavoritefont, Courier New"

in his or her vimrc file or even define it before :source'ing 2html.vim .

     The more complex solution would satisfy one of the design goals:

:help design-flexible

HTH                                     --Benji Fisher

Reply via email to