DirectWrite

本页使用了标题或全文手工转换
维基百科,自由的百科全书

DirectWrite微软的一个文本布局和字形渲染API。它的设计是为取代GDI/GDI+和面向屏幕渲染的Uniscribe,并已随Windows 7Windows Server 2008 R2发售提供,Windows VistaWindows Server 2008亦可获取(只需安装平台更新)。[1]DirectWrite在Direct2D上以硬件加速(使用GPU)形式运行,但也可以在CPU上渲染任何目标,包括GDI位图。[2][3]

特性[编辑]

  • 全面支持Unicode,超过20个脚本提供Windows支持的每种语言的布局和渲染。DirectWrite支持多格式文本的测量、渲染和命中测试英语Hit-testing

Windows 8.1中,DirectWrite开始支持彩色字体[5][6]

使用[编辑]

Windows 7中的XPS查看器使用DirectWrite,不过它在一个GDI+表面上渲染输出。[7]

Internet Explorer 9及之后版本使用Direct2D上的DirectWrite层改进视觉质量和性能。[8][9][10]Firefox 4也添加了DirectWrite支持,但由于用户对渲染质量的投诉,Firefox 7中对某些字体不会默认采用DirectWrite风格的渲染。[11]

Microsoft Office 2013支持Direct2D/DirectWrite或GDI/Uniscribe用于显示渲染和文字排版。[12]

Google ChromeWindows版自37版开始支持DirectWrite[13]

参见[编辑]

  • Pango:一个高质量呈现文本的跨平台库,尤为支持多语言文本。
  • Cairo:一个基于矢量的跨平台图形库,可以渲染文本。

参考资料[编辑]

  1. ^ The Platform Update for Windows Vista. DirectX Developer Blog. 10 September 2009 [27 January 2012]. (原始内容存档于2014年4月8日). 
  2. ^ Introducing DirectWrite. Microsoft Developer Network. Microsoft. [2017-05-26]. (原始内容存档于2017-06-13). 
  3. ^ Windows 7: Introducing Direct2D and DirectWrite页面存档备份,存于互联网档案馆) – PDC 2008 video 15:00-16:00 and 27:00-28:00
  4. ^ Windows 7: Introducing Direct2D and DirectWrite – pdc2008. Channel 9. Microsoft. 29 October 2008 [2017-05-26]. (原始内容存档于2011-06-30). 
  5. ^ What's new in DirectWrite. Microsoft Developer Network. Microsoft. [2017-05-26]. (原始内容存档于2017-07-14). 
  6. ^ Dan McLachlan. Innovations in High Performance 2D Graphics with DirectX – Build 2013. Channel 9. Microsoft. 26 June 2013 [2017-05-26]. (原始内容存档于2016-12-29). 
  7. ^ Worachai Chaoweeraprasit. Advances in typography and text rendering in Windows 7. Microsoft Developer Network. Microsoft. 13 February 2009 [2017-05-26]. (原始内容存档于2014-08-13). 
  8. ^ Tim Anderson. Firefox 4 as Psychedelic as IE9 with Direct2D enabled. itwriting.com. 11 August 2010 [6 August 2014]. (原始内容存档于2017-05-02). 
  9. ^ Shankland, Stephen. Firefox 4 beta 4 adds hardware acceleration. CNET. 25 March 2014 [6 August 2014]. (原始内容存档于2018-06-23). 
  10. ^ Mozilla chucks Roc at Microsoft's new hardness. The Register. 13 September 2010 [2017-05-26]. (原始内容存档于2017-04-01). 
  11. ^ DirectWrite Text Rendering in Firefox 6. Blog.mozilla.org. 11 August 2011 [9 August 2014]. (原始内容存档于2014年8月10日). 
  12. ^ Murray Sargent. Office Adopts New Windows Display Technology. Microsoft Developer Network. Microsoft. [2017-05-26]. (原始内容存档于2014-08-08). 
  13. ^ Brandon Chester. Google Updates Chrome To Version 37 With DirectWrite Support. AnandTech. 26 August 2014 [27 August 2014]. (原始内容存档于2016-12-18).