Readit News logoReadit News
osor_io commented on Rendering Crispy Text on the GPU   osor.io/text... · Posted by u/ibobev
eptcyka · 6 months ago
Would be great if the videos in the article were muted so that iOS didn’t stop playing my music whilst reading this.
osor_io · 6 months ago
Good shout. I've sorted that out, or at least tried to. Apparently adding "muted" to the html <video> tag is not as straight forward as we'd all like it to be :(
osor_io commented on Rendering Crispy Text on the GPU   osor.io/text... · Posted by u/ibobev
muglug · 6 months ago
It's a great post!

What happened to the dot of the italic "j" in the first video?

osor_io · 6 months ago
Thanks! <3

That was very perceptive :D

It's because the points on that specific dot are defined the opposite direction clock-wise compared to the rest of the curves on that font. So the renderer interprets them as an inner contour and not an outer one.

As far as I could tell, orientation is defined as either TrueType (outer contours are clockwise) or as Postscript (outer contours are counter-clockwise). If I find a Postscript-style orientation I just flip them so the renderer sees a consistent input. But for some reason that dot either is avoiding the flip through FreeType or is defined the other way in the source font file itself.

A lot of renderers are agnostic to the orientation of the curves, but that can lead to its own issues and undesired filled/unfilled areas. So it's pick your poison here. IIRC Sebastian Lague also has to deal with it in his amazing video about rendering text.

I might go check the source font file and see what's up. This is Libre Baskerville which is Open-Source so maybe we can even fix it if it's an inconsistency at that level.

Good catch!

osor_io commented on Rendering Crispy Text on the GPU   osor.io/text... · Posted by u/ibobev
osor_io · 6 months ago
Author here, didn't expect the post to make it here! Thanks so much to everyone who's reading it and participating in the interesting chat <3

u/osor_io

KarmaCake day34June 13, 2025View Original