On 25/01/2013 12:56, MURAOKA Taro wrote:
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.

The patch prevents DirectX rendering for OpenType fonts, which Inconsolata and Source Code Pro are - the value for tm.tmPitchAndFamily for these fonts is 0x3a. It does fix the issue with Courier.

Thanks.

2013/1/25 Mike Williams <[email protected]>:
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.





Mike
--
The two most common things in the Universe are Hydrogen and stupidity.

--
--
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



Raspunde prin e-mail lui