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

Re: using DirectX/DirectWrite for rendering text.

Expand Messages
  • MURAOKA Taro
    Hi Mike. ... Try this additional patch. It checks is the font TTF or not, when it is not TTF, fallback to GDI drawing. Thanks. ... -- MURAOKA Taro
    Message 1 of 58 , Jan 25, 2013
    • 0 Attachment
      Hi Mike.

      > However, the patch does not work with bitmap fonts such as Courier - all
      > the text just disappears. The code needs to check the font format to
      > decide whether to use DirectX for font rendering.

      Try this additional patch.
      It checks is the font TTF or not, when it is not TTF,
      fallback to GDI drawing.

      Thanks.

      2013/1/25 Mike Williams <mike.williams@...>:
      > On 24/01/2013 14:43, Taro MURAOKA wrote:
      >>
      >> Hi, list and Bram.
      >>
      >>
      >> Using modern fonts on MS-Windows, some texts drawn by GDI are very
      >> nasty. See attached before-dirextx.png, it is that. Ken Takata and I
      >> are working on this problem for the past few weeks, and have completed a
      >> patch to resolve it. Attached patch-direct_write.diff is that.
      >>
      >> In this patch, we use DirectX (DirectWrite) to draw texts. We
      >> implemented it with dynamic loading, so it make disabled automatically
      >> on MS-Windows old version which doesn't support DirectWrite (ex: XP).
      >>
      >> See after-directx.png, it have more beautiful rendered glyph than
      >> before-directx.png.
      >>
      >>
      >> I hope this patch helps complex glyph users, not only Japanese.
      >
      >
      > It improves text rendering for plain ol' ASCII as well - character stem
      > widths are more consistent. The effect is subtle with Consolas but more
      > obvious with Adobe's Source Code Pro - in fact, it makes Source Code Pro
      > look right (see attached)! Obviously Consolas was designed for use with the
      > default Windows fonts renderer so this patch improves rendering with non MS
      > fonts.
      >
      > However, the patch does not work with bitmap fonts such as Courier - all the
      > text just disappears. The code needs to check the font format to decide
      > whether to use DirectX for font rendering.
      >
      > TTFN
      >
      > Mike
      > --
      > The two most common things in the Universe are Hydrogen and stupidity.



      --
      MURAOKA Taro <koron.kaoriya@...>

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Peter Prohaska
      Pasting text produces inconstisten screen state. Looks like a mixture of monospaced and proportional font. Resetting rop to empty fixes the problem--and
      Message 58 of 58 , Aug 20, 2013
      • 0 Attachment
        Pasting text produces inconstisten screen state. Looks like a mixture of
        monospaced and proportional font. Resetting rop to empty fixes the
        problem--and reintroduces the missing char glyphs.

        Attached is screenshot with the lines showing
        1) state right after paste (cursor was aligned above the 2nd-row tsu
        2) state after moving one character to the left ("h")
        3) state after moving left till column 1 ("hhh")

        Yank and paste, scroll off screen and back in, all produce state (1).
        Selections mark the full width as in state (3). Moving the cursor over a
        position triggers the update as seen in state (2).

        Test settings:
        rop=type:directx
        guifont=DejaVu_Sans_Mono:h10:cANSI

        Test Build: VC10; Win8; nmake -f Make_mvc.mak GUI=yes DIRECTX=yes


        Aside:
        It should definitely make it into vim.

        Skimmed through the code. Don't know much about the specific job. Looks
        solid enough. Patch currelty produces a rejected hunk against hg due to the
        addition of 'regexpengine' option.

        My user experience: Try a few dozen fonts, find a hadfull that works
        acceptable. Pre patch: rest is unusable. Post patch: rest works good or
        great. Editing terminological datasets often, i hearty recommend this
        pain-killer (or a different OS).

        Regards,
        Peter.

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.