astiopin/webgl_fonts
关于
WebGL font rendering
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文WebGL Font Rendering
Demonstration of a font rendering on the GPU with glyph hinting and subpixel antialiasing.
The demo uses signed distance field method for glyph rendering.
Click here to see the demo (requires WebGL).
Font atlas generation tool is here.
Hinting
The idea is pretty simple. First we're placing the text baseline exactly at the pixel boundary. Next we're using two different methods to place the glyphs. Lowcase characters are scaled in a such way that the x-height spans a whole number of pixels. All other characters are scaled to fit the cap height to the pixel boundary.

At the rasterisation stage we're modifying the antialiazing routine so that the antialiazed edge distance depends on a stroke direction, which makes horizontal strokes appear sharper than the vertical ones.

探索相关项目
加载中…