3 ms·
Will there be better typography in WEbGPU?
by andrewstuart 3y ago
Will there be better typography in WEbGPU?
- flohofwoe 3y agoWebGPU is completely separate from the browser's text rendering engine (unfortunately).
- andrewstuart 3y agoI ask because WebGL almost never has typography. I assume there are technical reasons.
- flohofwoe 3y agoBecause text rendering is (very) hard, and most 3D rendering people are not text rendering experts, but just want to get some text on screen even if it looks ugly. Unfortunately the browser lacks a proper layered API design with low level APIs at the bottom (like WebGL and WebGPU), medium level APIs in the middle (like text rendering and layout), and high level APIs at the top (like the DOM and CSS) - so if you want to render text in WebGL or WebGPU, you are entirely on your own.
- paulgb 3y agoIt won't live in WebGPU itself, but I do expect to start to see more third-party libraries for text. There’s already wgpu_glyph (https://github.com/hecrj/wgpu_glyph/tree/master https://github.com/hecrj/wgpu_glyph/tree/master) which uses a glyph atlas (CPU-rendered sprite map of characters), but techniques for signed-distance field fonts have come a long way too.