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

Monaco h10 and antialiasing

Expand Messages
  • björn
    Hi all, Below is part of an Issue report that I do not know the answer to. Maybe somebody on this list will. I can confirm myself that Monaco font of size 10
    Message 1 of 9 , Dec 3, 2007
    • 0 Attachment
      Hi all,

      Below is part of an Issue report that I do not know the answer to.
      Maybe somebody on this list will. I can confirm myself that Monaco
      font of size 10 or less never renders antialiased regardless of the
      System Preferences settings.

      /Björn

      ==== begin issue report ====

      What steps will reproduce the problem?
      1. Launch MacVim.
      2. Execute ":set anti gfn=Monaco:h10"
      3. Observe font rendering.

      What is the expected output? What do you see instead?
      I expect the font to be antialiased, but instead it isn't, and same goes
      for small font sizes. If I select Monaco:h11 or higher for the guifont,
      however, it is correctly rendered antialiased.

      --------

      This is a System Preferences controlled setting that affects all Cocoa
      applications. This thread will tell you how
      to change it:

      http://groups.google.com/group/vim_mac/browse_thread/thread/b4d71cc7f3a685d3/dba8ef8f004be77c?
      lnk=gst&q=antialias#dba8ef8f004be77c

      Good luck,
      Björn

      -------

      Thanks Björn, but unfortunately it didn't seem to do the trick. It seems to be
      something specific to the Monaco font, because Andale Mono behaves as expected
      (antialiasing conforms to the System Preferences setting).

      Monaco 11pt works correctly: If I choose that, and System Preferences says don't
      antialias fonts below 10pt, then it renders antialiased. When I
      increase the System
      Preferences setting to 12pt, then, as expected, antialiasing of Monaco
      11pt turns off.

      However, anything below Monaco 11pt doesn't work correctly: If I
      choose Monaco 10pt,
      and System Preferences says don't antialias fonts below 8pt, then it still is
      rendered without antialiasing.

      Is this a Cocoa problem, or what? In Terminal, I also use Monaco 10pt,
      and it *is*
      properly rendered antialiased. Isn't Terminal a Cocoa app, too? Why
      should MacVim
      behave differently, I wonder...

      gVim for Macintosh always renders it antialiased, which is nice...

      ==== end issue report ====

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Jjgod Jiang
      Hi björn, ... Have you tried ignore system settings, force antialiasing/non-antialiasing according to the antialias option of vim? - Jiang
      Message 2 of 9 , Dec 3, 2007
      • 0 Attachment
        Hi björn,

        On Dec 4, 2007 1:41 AM, björn <bjorn.winckler@...> wrote:
        > Below is part of an Issue report that I do not know the answer to.
        > Maybe somebody on this list will. I can confirm myself that Monaco
        > font of size 10 or less never renders antialiased regardless of the
        > System Preferences settings.

        Have you tried ignore system settings, force antialiasing/non-antialiasing
        according to the 'antialias' option of vim?

        - Jiang

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • björn
        ... No, I don t touch any antialiasing options. In fact, I don t even know how to turn antialiasing on/off with the Cocoa text system. ;-) /Björn
        Message 3 of 9 , Dec 3, 2007
        • 0 Attachment
          On 03/12/2007, Jjgod Jiang <gzjjgod@...> wrote:
          >
          > Hi björn,
          >
          > On Dec 4, 2007 1:41 AM, björn <bjorn.winckler@...> wrote:
          > > Below is part of an Issue report that I do not know the answer to.
          > > Maybe somebody on this list will. I can confirm myself that Monaco
          > > font of size 10 or less never renders antialiased regardless of the
          > > System Preferences settings.
          >
          > Have you tried ignore system settings, force antialiasing/non-antialiasing
          > according to the 'antialias' option of vim?

          No, I don't touch any antialiasing options. In fact, I don't even
          know how to turn antialiasing on/off with the Cocoa text system. ;-)

          /Björn

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Jjgod Jiang
          Hi, ... I thought it s a easy job, but it turns out not the case, I only found a relevant option called NSFontRenderingMode, but it s seems I can t create a
          Message 4 of 9 , Dec 3, 2007
          • 0 Attachment
            Hi,

            On Dec 4, 2007 4:54 AM, björn <bjorn.winckler@...> wrote:
            > No, I don't touch any antialiasing options. In fact, I don't even
            > know how to turn antialiasing on/off with the Cocoa text system. ;-)

            I thought it's a easy job, but it turns out not the case, I only found a
            relevant option called NSFontRenderingMode, but it's seems I can't
            create a new (scalable) NSFont with specific NSFontRenderingMode.
            (The only API related with NSFontRenderingMode is
            -screenFontWithRenderingMode:, but that's not for AppKit usage,
            according to the manual.)

            - Jiang

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • björn
            ... It s weird, isn t it. I also thought it d be easy. My guess is that Apple wants us to rely on the System Preferences settings (which don t even work
            Message 5 of 9 , Dec 4, 2007
            • 0 Attachment
              On 03/12/2007, Jjgod Jiang <gzjjgod@...> wrote:
              >
              > On Dec 4, 2007 4:54 AM, björn <bjorn.winckler@...> wrote:
              > > No, I don't touch any antialiasing options. In fact, I don't even
              > > know how to turn antialiasing on/off with the Cocoa text system. ;-)
              >
              > I thought it's a easy job, but it turns out not the case, I only found a
              > relevant option called NSFontRenderingMode, but it's seems I can't
              > create a new (scalable) NSFont with specific NSFontRenderingMode.
              > (The only API related with NSFontRenderingMode is
              > -screenFontWithRenderingMode:, but that's not for AppKit usage,
              > according to the manual.)

              It's weird, isn't it. I also thought it'd be easy. My guess is that
              Apple wants us to rely on the System Preferences settings (which don't
              even work properly in the case of Monaco!). Can you control the font
              smoothing with your ATSUI code (even for Monaco)?


              /Björn

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Matt Tolton
              It may be that Apple special cases Monaco....I personally think that Monaco looks better without antialiasing at 10 pt. ...
              Message 6 of 9 , Dec 4, 2007
              • 0 Attachment
                It may be that Apple special cases Monaco....I personally think that
                Monaco looks better without antialiasing at 10 pt.

                On 12/4/07, björn <bjorn.winckler@...> wrote:
                >
                > On 03/12/2007, Jjgod Jiang <gzjjgod@...> wrote:
                > >
                > > On Dec 4, 2007 4:54 AM, björn <bjorn.winckler@...> wrote:
                > > > No, I don't touch any antialiasing options. In fact, I don't even
                > > > know how to turn antialiasing on/off with the Cocoa text system. ;-)
                > >
                > > I thought it's a easy job, but it turns out not the case, I only found a
                > > relevant option called NSFontRenderingMode, but it's seems I can't
                > > create a new (scalable) NSFont with specific NSFontRenderingMode.
                > > (The only API related with NSFontRenderingMode is
                > > -screenFontWithRenderingMode:, but that's not for AppKit usage,
                > > according to the manual.)
                >
                > It's weird, isn't it. I also thought it'd be easy. My guess is that
                > Apple wants us to rely on the System Preferences settings (which don't
                > even work properly in the case of Monaco!). Can you control the font
                > smoothing with your ATSUI code (even for Monaco)?
                >
                >
                > /Björn
                >
                > >
                >

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Ben Schmidt
                ... I would guess that Monaco is one of the few fonts that has a bitmap font installed, so that is simply used, rather than a scalable font going through the
                Message 7 of 9 , Dec 9, 2007
                • 0 Attachment
                  Matt Tolton wrote:
                  > It may be that Apple special cases Monaco....I personally think that
                  > Monaco looks better without antialiasing at 10 pt.

                  I would guess that Monaco is one of the few fonts that has a bitmap font
                  installed, so that is simply used, rather than a scalable font going through the
                  rasteriser with or without antialiasing.

                  But didn't somebody say that Monaco was correctly antialiased in some other app?
                  Terminal.app perhaps? My memory is shady.

                  Is there perhaps some option to the rendering API used that allows you to disable
                  the use of bitmap fonts, or force use of scalable/outline fonts, or prefer their
                  use, or something like that? It's just a guess, but I reckon that might fix it, if
                  there is such an option.

                  ...

                  Actually, a little Googling seems to confirm my theory. This page is a bit of a
                  rant on the topic, though I don't think the author understands the technical
                  details at all:

                  http://daringfireball.net/2003/03/antialiasing

                  And this page is a changeset in response to a ticket where this 'bug' was fixed in
                  some other application.

                  http://trac.clozure.com/openmcl/changeset/7684
                  http://trac.clozure.com/openmcl/ticket/183

                  I have no idea if this is the same rendering engine that MacVim is currently
                  using/will use, but it seems to me that the fix will be related to use or not of
                  'screen fonts' anyway.

                  And I can see that there would definitely be people in both camps as to whether
                  they would want antialiasing or not. I would suggest having an option to turn
                  antialiasing on or off, and when it's on, also turn off use of screen/bitmap fonts
                  to ensure you truly do always get antialiasing (but use them when antialiasing is
                  off so you still get the nicely hand-crafted bitmaps at small sizes which are much
                  better than what a rasteriser will output).

                  Cheers,

                  Ben.




                  Send instant messages to your online friends http://au.messenger.yahoo.com


                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Nico Weber
                  ... Both Terminal.app and Textmate will antialias Monaco if you ask them to. Nico --~--~---------~--~----~------------~-------~--~----~ You received this
                  Message 8 of 9 , Dec 10, 2007
                  • 0 Attachment
                    > But didn't somebody say that Monaco was correctly antialiased in
                    > some other app?
                    > Terminal.app perhaps? My memory is shady.

                    Both Terminal.app and Textmate will antialias Monaco if you ask them to.

                    Nico

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • björn
                    ... I just had a look at this (thanks for the info btw ;-). Disabling screen fonts has the effect that fonts always render antialiased (the System Preferences
                    Message 9 of 9 , Jan 23, 2008
                    • 0 Attachment
                      On 10/12/2007, Ben Schmidt <mail_ben_schmidt@...> wrote:
                      >
                      > Matt Tolton wrote:
                      > > It may be that Apple special cases Monaco....I personally think that
                      > > Monaco looks better without antialiasing at 10 pt.
                      >
                      > I would guess that Monaco is one of the few fonts that has a bitmap font
                      > installed, so that is simply used, rather than a scalable font going through the
                      > rasteriser with or without antialiasing.
                      >
                      > But didn't somebody say that Monaco was correctly antialiased in some other app?
                      > Terminal.app perhaps? My memory is shady.
                      >
                      > Is there perhaps some option to the rendering API used that allows you to disable
                      > the use of bitmap fonts, or force use of scalable/outline fonts, or prefer their
                      > use, or something like that? It's just a guess, but I reckon that might fix it, if
                      > there is such an option.
                      >
                      > ...
                      >
                      > Actually, a little Googling seems to confirm my theory. This page is a bit of a
                      > rant on the topic, though I don't think the author understands the technical
                      > details at all:
                      >
                      > http://daringfireball.net/2003/03/antialiasing
                      >
                      > And this page is a changeset in response to a ticket where this 'bug' was fixed in
                      > some other application.
                      >
                      > http://trac.clozure.com/openmcl/changeset/7684
                      > http://trac.clozure.com/openmcl/ticket/183
                      >
                      > I have no idea if this is the same rendering engine that MacVim is currently
                      > using/will use, but it seems to me that the fix will be related to use or not of
                      > 'screen fonts' anyway.
                      >
                      > And I can see that there would definitely be people in both camps as to whether
                      > they would want antialiasing or not. I would suggest having an option to turn
                      > antialiasing on or off, and when it's on, also turn off use of screen/bitmap fonts
                      > to ensure you truly do always get antialiasing (but use them when antialiasing is
                      > off so you still get the nicely hand-crafted bitmaps at small sizes which are much
                      > better than what a rasteriser will output).

                      I just had a look at this (thanks for the info btw ;-). Disabling
                      screen fonts has the effect that fonts always render antialiased (the
                      System Preferences are ignored). So whether screen fonts are on or
                      off doesn't matter....the System Preferences setting is always ignored
                      (at least for Monaco)!

                      For the moment I will leave things as they are. When the ATSUI render
                      is ready we will be able to let the user enable/disable antialiasing
                      (via a Vim option), but with the current renderer it just doesn't seem
                      possible.

                      /Björn

                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.