Download presentation
Presentation is loading. Please wait.
Published byMarquis Poland Modified over 9 years ago
2
A Survey of Font Rendering Techniques Cameron Egbert Software Development Engineer XNA Developer Connection Microsoft
4
Appetizer Texture BasedVector TextureGPU Vector Graphic
5
Texture Based Fonts Render textured quads + Easy + Render anything representable with a texture - The usual blocky texture artifacts
6
Vector Textures “Improved Alpha Tested Magnification for Vector Textures and Special Effects” – Chris Green 2007 256x256 Distance Map 4096x4096 texture Uses a distance field representation Threshold the distance map to get the final text Enables various edge effects
7
Caveats Sharp features tend to get rounded off Vector Texture Reference Breaks down at high magnification
8
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
9
As Seen in Team Fortress 2 Vector Texture based text with anti-aliasing and soft drop-shadows (courtesy Valve Software)
10
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
11
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
12
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
13
As Seen in Forza Motorsport 2 GPU Vector graphic based text with anti-aliasing
14
demo
15
Performance XBox 360 GPU 1255 Characters 1280x720 A8R8G8B8 Surface time (mS) Traditional Texture0.34 Vector Texture0.57 Vector Texture (AA)0.57 GPU Vector Graphic0.47 GPU Vector Graphic (AA)1.69
16
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
17
Questions? cegbert@microsoft.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.