Loading ...
Sorry, an error occurred while loading the content.
 

fonts in gvim

Expand Messages
  • Jorge Almeida
    I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is set in ~/.gvimrc with ... Now, when editing a html file, gvim displays a bold font for
    Message 1 of 6 , Aug 31, 2004
      I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is
      set in ~/.gvimrc with
      :set guifont=Luxi\ Mono\ 12
      Now, when editing a html file, gvim displays a bold font for the field
      in <strong>...</strong>, a slanted font for <em>...</em>, etc.
      The point is, how can I set these fonts? I really need to do something
      about this, because the bold font looks *really* crappy since I changed
      from xfree to xorg. But bold fonts in other applications are normal, so
      I can't be sure whether the problem is xorg-related or not...
      (Anti-aliasing is on; I tried without AA and it's *even* worse.)

      Thanks.

      Jorge Almeida
    • Alejandro Lopez-Valencia
      ... Jorge, the problem is probably related to the rendering engine and/or fontconfig s settings. First, You may want as well review the fontconfig
      Message 2 of 6 , Aug 31, 2004
        At 05:46 a.m. 31/08/2004, Jorge Almeida wrote:
        >I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is
        >set in ~/.gvimrc with
        > :set guifont=Luxi\ Mono\ 12
        >Now, when editing a html file, gvim displays a bold font for the field
        >in <strong>...</strong>, a slanted font for <em>...</em>, etc.
        >The point is, how can I set these fonts? I really need to do something
        >about this, because the bold font looks *really* crappy since I changed
        >from xfree to xorg. But bold fonts in other applications are normal, so
        >I can't be sure whether the problem is xorg-related or not...
        >(Anti-aliasing is on; I tried without AA and it's *even* worse.)


        Jorge,

        the problem is probably related to the rendering engine and/or fontconfig's
        settings.

        First, You may want as well review the fontconfig configuration files and
        see if LuxiMono is configured as a font family (with italic faces and bold
        wights).

        Second, it might be that the FreeType library installed was configured
        incorrectly in the distro package, or that the version used by XOrg is
        older than the one used by XFree86. Try updating FreeType to the latest
        release.
      • Jürgen Krämer
        Hi, ... have a look at ... and search for the information on htmlBold, htmlBoldUnderline, etc. There you will find that you can provide your own highlighting
        Message 3 of 6 , Aug 31, 2004
          Hi,

          Jorge Almeida wrote:
          >
          > I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is
          > set in ~/.gvimrc with
          > :set guifont=Luxi\ Mono\ 12
          > Now, when editing a html file, gvim displays a bold font for the field
          > in <strong>...</strong>, a slanted font for <em>...</em>, etc.
          > The point is, how can I set these fonts? I really need to do something
          > about this, because the bold font looks *really* crappy since I changed
          > from xfree to xorg. [...]

          have a look at

          :help html-syntax

          and search for the information on htmlBold, htmlBoldUnderline, etc.
          There you will find that you can provide your own highlighting by
          putting something like the following into your .vimrc

          hi htmlBold term=NONE cterm=NONE gui=NONE
          hi htmlBoldUnderline term=underline cterm=underline gui=underline
          " ...

          let html_my_rendering = 1

          (The "hi"-lines above were (almost verbatimly) copied from the default
          html syntax file, and the "bold" attributes were either removed or
          replaced by "NONE" if they were the only attributes after "term=",
          "cterm=", or "gui=".)

          Regards,
          Jürgen

          --
          Jürgen Krämer Softwareentwicklung
          Habel GmbH mailto:jkr@...
          Hinteres Öschle 2 Tel: (0 74 61) 93 53 - 15
          78604 Rietheim-Weilheim Fax: (0 74 61) 93 53 - 99
        • Antoine J. Mechelynck
          ... You can either use another font face all over gvim by setting guifont (see http://vim.sourceforge.net/tips/tip.php?tip_id=632 ); or set highlights for
          Message 4 of 6 , Aug 31, 2004
            Jorge Almeida <jalmeida@...> wrote:
            > I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is
            > set in ~/.gvimrc with
            > :set guifont=Luxi\ Mono\ 12
            > Now, when editing a html file, gvim displays a bold font for the field
            > in <strong>...</strong>, a slanted font for <em>...</em>, etc.
            > The point is, how can I set these fonts? I really need to do something
            > about this, because the bold font looks *really* crappy since I
            > changed from xfree to xorg. But bold fonts in other applications are
            > normal, so I can't be sure whether the problem is xorg-related or
            > not... (Anti-aliasing is on; I tried without AA and it's *even*
            > worse.)
            >
            > Thanks.
            >
            > Jorge Almeida

            You can either use another font face all over gvim by setting 'guifont' (see
            http://vim.sourceforge.net/tips/tip.php?tip_id=632 ); or set highlights for
            the following groups, removing the "gui=bold" part:

            Title
            Type
            htmlBold
            htmlBoldItalic
            htmlBoldUnderline
            htmlBoldUnderlineItalic

            (there are others but you need not change them because they are linked to
            the above).

            Regards,
            Tony.
          • Jorge Almeida
            ... You re probably right, since my computer at work has the same vim version and configuration and has better-looking fonts (it still uses xfree). fontconfig
            Message 5 of 6 , Aug 31, 2004
              On Tue, 31 Aug 2004, Alejandro Lopez-Valencia wrote:
              >
              > the problem is probably related to the rendering engine and/or fontconfig's
              > settings.
              >
              > First, You may want as well review the fontconfig configuration files and see
              > if LuxiMono is configured as a font family (with italic faces and bold
              > wights).
              >
              > Second, it might be that the FreeType library installed was configured
              > incorrectly in the distro package, or that the version used by XOrg is older
              > than the one used by XFree86. Try updating FreeType to the latest release.
              >
              You're probably right, since my computer at work has the same vim
              version and configuration and has better-looking fonts (it still uses
              xfree).
              fontconfig and freetype are the latest (at least, the latest considered
              stable in gentoo). What I really miss is documentation for users (as
              opposed to documentation for developers/sysadmins). Googling for
              fontconfig+(tutorial|howto) is fruitless...

              Thank you,

              Jorge
            • P@draigBrady.com
              ... Yes I find anti-aliasing is worse for fixed size fonts. http://www.pixelbeat.org/docs/gvim/gvim.html describes how to select a non anti aliased font. Also
              Message 6 of 6 , Sep 1, 2004
                Jorge Almeida wrote:
                > I use the font Luxi Mono 12 on gvim (OS is gentoo linux). The font is
                > set in ~/.gvimrc with
                > :set guifont=Luxi\ Mono\ 12
                > Now, when editing a html file, gvim displays a bold font for the field
                > in <strong>...</strong>, a slanted font for <em>...</em>, etc.
                > The point is, how can I set these fonts? I really need to do something
                > about this, because the bold font looks *really* crappy since I changed
                > from xfree to xorg. But bold fonts in other applications are normal, so
                > I can't be sure whether the problem is xorg-related or not...
                > (Anti-aliasing is on; I tried without AA and it's *even* worse.)

                Yes I find anti-aliasing is worse for fixed size fonts.
                http://www.pixelbeat.org/docs/gvim/gvim.html describes
                how to select a non anti aliased font. Also referenced
                there is my ~/.gvimrc which shows how to disable bold
                automatically while leaving the rest of your syntax
                highlighting alone.

                Pádraig.
              Your message has been successfully submitted and would be delivered to recipients shortly.