News for hackers. Stuff that matters.
Re:Rendering Crispy Text on the GPU by rudedogg on Friday June 13, 2025 @01:53AM (#44266027)
If I understand correctly, the authors approach doesn't really have this problem since they only upload the glyphs being used to the GPU (at runtime). Yes you still have to pre-compute them for your font, but that should be fine.
Re:Rendering Crispy Text on the GPU by chii on Friday June 13, 2025 @02:01AM (#44266063)
but the grandparent post is talking about a browser - how would a browser pre-compute a font, when the fonts are specified by the webpage being loaded?
Re:Rendering Crispy Text on the GPU by onion2k on Friday June 13, 2025 @03:03AM (#44266337)
The most common way this is done is by parsing the font and generating the SDF fields on the fly (usually using Troika - https://github.com/protectwise/troika/blob/main/packages/tro...). It slows down the time to the first render, but it's only a matter of hundreds of ms not seconds, and as part of rendering 3D on webpage no one really expects it to be that fast to start up.
Re:Rendering Crispy Text on the GPU by fc417fc802 on Friday June 13, 2025 @05:39AM (#44267074)
> It slows down the time to the first render

Would caching (domain restricted ofc) not trivially fix that? I don't expect a given website to use very many fonts or that they would change frequently.

Re:Rendering Crispy Text on the GPU by krona on Friday June 13, 2025 @04:51AM (#44266874)
webassembly hosting freetype in a webworker. not too difficult.