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

Monospaced font problem

Expand Messages
  • Pablo Arantes
    Fellow users, I m using gvim 7.0 in a Windows XP SP2 box and I m experiencing a problem with font selection. I want to set as the default gui font a TTF
    Message 1 of 6 , Mar 31, 2007
      Fellow users,

      I'm using gvim 7.0 in a Windows XP SP2 box and I'm experiencing a
      problem with font selection. I want to set as the default gui font a TTF
      monospaced font, called Pragmata TT, but it won't show up in the list
      of available fonts. I've searched the vim archives and google and
      cannot figure out why it won't be listed as an option even though it *is* a
      monospaced font and other TTF monospaced fonts appear in the list.

      The font author could not help and provided me an OTF version that gvim
      accepts, although it renders much worse than the TTF in programs where
      the latter version actually works.

      Thanks in advance for any tip or suggestion.

      --
      Pablo
    • Robert Hicks
      ... How are you setting guifont to use it? Robert
      Message 2 of 6 , Mar 31, 2007
        Pablo Arantes wrote:
        > Fellow users,
        >
        > I'm using gvim 7.0 in a Windows XP SP2 box and I'm experiencing a
        > problem with font selection. I want to set as the default gui font a TTF
        > monospaced font, called Pragmata TT, but it won't show up in the list
        > of available fonts. I've searched the vim archives and google and
        > cannot figure out why it won't be listed as an option even though it *is* a
        > monospaced font and other TTF monospaced fonts appear in the list.
        >
        > The font author could not help and provided me an OTF version that gvim
        > accepts, although it renders much worse than the TTF in programs where
        > the latter version actually works.
        >
        > Thanks in advance for any tip or suggestion.
        >
        How are you setting "guifont" to use it?

        Robert
      • A.J.Mechelynck
        ... Well, maybe the code in the font itself doesn t identify it as fixed-width. Except in gvim versions with GTK2 GUI (which are for X11, thus not for
        Message 3 of 6 , Mar 31, 2007
          Pablo Arantes wrote:
          > Fellow users,
          >
          > I'm using gvim 7.0 in a Windows XP SP2 box and I'm experiencing a
          > problem with font selection. I want to set as the default gui font a TTF
          > monospaced font, called Pragmata TT, but it won't show up in the list
          > of available fonts. I've searched the vim archives and google and
          > cannot figure out why it won't be listed as an option even though it *is* a
          > monospaced font and other TTF monospaced fonts appear in the list.
          >
          > The font author could not help and provided me an OTF version that gvim
          > accepts, although it renders much worse than the TTF in programs where
          > the latter version actually works.
          >
          > Thanks in advance for any tip or suggestion.
          >

          Well, maybe the code in the font itself doesn't identify it as fixed-width.
          Except in gvim versions with GTK2 GUI (which are for X11, thus not for
          native-Windows), gvim will only accept fonts that identify themselves as
          fixed-width. Apparently your Pragmata TT font doesn't. OTOH, Lucida Console
          does, although its bold Cyrillic glyphs are very slightly wider than other
          glyphs, which makes its use problematic when editing Russian.

          If ":set guifont=Pragmata_TT:h12:cDEFAULT" or ":set
          guifont=Pragmata:h12:cDEFAULT" don't work, then your only choice is to use
          another font, unless you want to compile a version of gvim for Cygwin/X11 with
          GTK2 GUI; but there are other problems to that.


          Best regards,
          Tony.
          --
          hundred-and-one symptoms of being an internet addict:
          155. You forget to eat because you're too busy surfing the net.
        • A.J.Mechelynck
          ... Well, I suppose there is, either by means of a font editor (I suppose such a program exists but I don t know under what name) or by binary editing (but I
          Message 4 of 6 , Mar 31, 2007
            Pablo Arantes wrote:
            > Tony,
            >
            > I very much suspect you're right about it: Pragmata must be lacking
            > the specification of being a monospaced font. Other editors besides
            > gvim also fail to recognize the font as a valid option. Ironically, I
            > was able to set the font as the default in Emacs accepts, but I'm
            > afraid it's too late for a change in my religious beliefs now :-)
            >
            > I contacted the author of Pragmata to share my concerns but he
            > couldn't help me much in this respect. I explained him the problem but
            > I'm not sure he understood it. I wonder if there is a feasible way to
            > change this specification myself.
            >
            > Thanks for your help,
            >
            > Pablo

            Well, I suppose there is, either by means of a font editor (I suppose such a
            program exists but I don't know under what name) or by binary editing (but I
            don't know what must be changed).

            Another question is of course the copyright: by editing that font in such a
            way, you would quite likely be infringeing the terms of the license under
            which you got it. Not that it would matter much as long as you don't
            redistribute the modified version.


            Best regards,
            Tony.
            --
            Wethern's Law:
            Assumption is the mother of all screw-ups.
          • Tobia
            ... I emailed him too. We share our first language, so maybe he will understand me better. ... I had a look at the TTF file format[1] and it s quite easy. I
            Message 5 of 6 , Apr 1 4:55 AM
              Pablo Arantes wrote:
              > I contacted the author of Pragmata to share my concerns but he
              > couldn't help me much in this respect. I explained him the problem but
              > I'm not sure he understood it.

              I emailed him too. We share our first language, so maybe he will
              understand me better.


              > I wonder if there is a feasible way to change this specification myself.

              I had a look at the TTF file format[1] and it's quite easy. I have
              attached a small Python script that will query, set or clear the
              monospaced flag on a TTF file. Run it with no arguments to get help.

              Remember to operate on a copy of the font file and to install/uninstall
              the font through Windows's Control Panel. That is: make a copy of the
              font file; set the flag on it; uninstall the currently installed font;
              install the modified version; profit.


              Tobia

              [1]
              http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html
              http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6post.html
            • Pablo Arantes
              Tobia, Man, you re a genius! Your script solved the problem. I ran it and now every program (including gvim, of course) recognizes Pragmata as being
              Message 6 of 6 , Apr 2 2:20 PM
                Tobia,

                Man, you're a genius! Your script solved the problem. I ran it and now
                every program (including gvim, of course) recognizes Pragmata as being
                monospaced.

                Thank you very much.

                --
                Pablo

                ---------- Forwarded message ----------
                From: Tobia <tobia.conforto@...>
                To: 'Vim mailing list' <vim@...>
                Date: Sun, 1 Apr 2007 13:55:46 +0200
                Subject: Re: Monospaced font problem
                Pablo Arantes wrote:
                > I contacted the author of Pragmata to share my concerns but he
                > couldn't help me much in this respect. I explained him the problem but
                > I'm not sure he understood it.

                I emailed him too. We share our first language, so maybe he will
                understand me better.


                > I wonder if there is a feasible way to change this specification myself.

                I had a look at the TTF file format[1] and it's quite easy. I have
                attached a small Python script that will query, set or clear the
                monospaced flag on a TTF file. Run it with no arguments to get help.

                Remember to operate on a copy of the font file and to install/uninstall
                the font through Windows's Control Panel. That is: make a copy of the
                font file; set the flag on it; uninstall the currently installed font;
                install the modified version; profit.


                Tobia

                [1]
                http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html
                http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6post.html
              Your message has been successfully submitted and would be delivered to recipients shortly.