1 / 17

A Survey of Font Rendering Techniques

A Survey of Font Rendering Techniques. Cameron Egbert Software Development Engineer XNA Developer Connection Microsoft. Appetizer. Texture Based. Vector Texture. GPU Vector Graphic. Texture Based Fonts. Render textured quads + Easy + Render anything representable with a texture

gerek
Download Presentation

A Survey of Font Rendering Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Survey of Font Rendering Techniques Cameron Egbert Software Development Engineer XNA Developer Connection Microsoft

  2. Appetizer Texture Based Vector Texture GPU Vector Graphic

  3. Texture Based Fonts • Render textured quads • + Easy • + Render anything representable with a texture • - The usual blocky texture artifacts

  4. Vector Textures“Improved Alpha Tested Magnification for Vector Textures and Special Effects” – Chris Green 2007 • Uses a distance field representation • Threshold the distance map to get the final text • Enables various edge effects 4096x4096 texture 256x256 Distance Map

  5. Caveats • Sharp features tend to get rounded off Vector Texture Reference • Breaks down at high magnification

  6. Comparison + Almost as simple as traditional textures + Much better visual quality + No shaders required, just Alpha Test + Edge Effects & Antialiasing (with shaders) - Tends to cut corners off

  7. As Seen in Team Fortress 2 Vector Texture based text with anti-aliasing and soft drop-shadows (courtesy Valve Software)

  8. GPU Vector Graphics“Resolution Independent Curve Rendering Using Programmable Graphics Hardware” – Loop and Blinn 2005 • Convert character outline to Bézier curves • Render curves as triangles with an inside-outside test • Use derivatives for edge effects & anti-aliasing • Requires extra geometry

  9. Caveats • Creating the geometry is a bit involved • Intersecting outlines • Complex characters • Designed for quadratic and cubic Béziers • Anti-Aliasing requires a lot of geometry

  10. Comparison +Resolution independence! +Perfect reproduction of quadratic and cubic Bézier curves +Edge effects & anti-aliasing (with extra geometry) - Performance is tied to font complexity

  11. As Seen in Forza Motorsport 2 GPU Vector graphic based text with anti-aliasing

  12. demo

  13. Performance • XBox 360 GPU • 1255 Characters • 1280x720 A8R8G8B8 Surface

  14. Recommendations • Traditional textures for non-vector graphics • Vector Textures if you don’t mind slightly rounded corners • GPU Vector Graphics if you can invest in the highest visual quality

  15. Questions? cegbert@microsoft.com

More Related