video thumbnail 1:10:54
Coding Adventure: Rendering Text

2024-04-13

[public] 7.12K views, 34.8K likes, dislikes audio only

channel thumbSebastian Lague
4K

This... is text! Let's figure out how to draw it.

Starring: Bézier curves and (oh so many) floating point problems.

Source code: https://github.com/SebLague/Text-Rendering

If you'd like to support my work (and get early access to new projects) you can do so here:

https://www.patreon.com/SebastianLague

https://ko-fi.com/sebastianlague

Resources:

https://developer.apple.com/fonts/TrueType-Reference-Manual/

https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf

https://wdobbie.com/post/gpu-text-rendering-with-vector-textures/

Font and Music Credits:

https://github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/TextRendering

Chapters

0:00:00 Intro

0:01:58 The Font Directory

0:04:27 Loading Simple Glyphs

0:10:42 Bézier Basics

0:13:42 The Character Map

0:15:47 Implied Points

0:18:11 Compound Glyphs

0:20:25 Size and Spacing

0:21:27 Rendering Glyphs with Lots of Triangles

0:22:17 Optimized Curve Rendering (Loop-Blinn)

0:28:20 A Brief Look at SDF Rendering

0:30:33 The Counting Method

0:31:48 Ray-Bézier Intersections

0:34:09 Point in Glyph Test

0:36:35 Shader Time

0:38:37 Floating Point Problems

0:41:22 The Evil Artifact Detector

0:45:36 The Closest Curve Method

0:50:48 Curve Splitting

0:54:31 Defeating the Evil Artifacts

0:58:58 Anti-Aliasing

1:02:47 Performance and Legibility

1:05:11 The Counting Method Returns

1:09:45 Outro


Intro
/youtube/video/SO83KQuuZvg?t=0
The Font Directory
/youtube/video/SO83KQuuZvg?t=118
Loading Simple Glyphs
/youtube/video/SO83KQuuZvg?t=267
Bézier Basics
/youtube/video/SO83KQuuZvg?t=642
The Character Map
/youtube/video/SO83KQuuZvg?t=822
Implied Points
/youtube/video/SO83KQuuZvg?t=947
Compound Glyphs
/youtube/video/SO83KQuuZvg?t=1091
Size and Spacing
/youtube/video/SO83KQuuZvg?t=1225
Rendering Glyphs with Lots of Triangles
/youtube/video/SO83KQuuZvg?t=1287
Optimized Curve Rendering (Loop-Blinn)
/youtube/video/SO83KQuuZvg?t=1337
A Brief Look at SDF Rendering
/youtube/video/SO83KQuuZvg?t=1700
The Counting Method
/youtube/video/SO83KQuuZvg?t=1833
Ray-Bézier Intersections
/youtube/video/SO83KQuuZvg?t=1908
Point in Glyph Test
/youtube/video/SO83KQuuZvg?t=2049
Shader Time
/youtube/video/SO83KQuuZvg?t=2195
Floating Point Problems
/youtube/video/SO83KQuuZvg?t=2317
The Evil Artifact Detector
/youtube/video/SO83KQuuZvg?t=2482
The Closest Curve Method
/youtube/video/SO83KQuuZvg?t=2736
Curve Splitting
/youtube/video/SO83KQuuZvg?t=3048
Defeating the Evil Artifacts
/youtube/video/SO83KQuuZvg?t=3271
Anti-Aliasing
/youtube/video/SO83KQuuZvg?t=3538
Performance and Legibility
/youtube/video/SO83KQuuZvg?t=3767
The Counting Method Returns
/youtube/video/SO83KQuuZvg?t=3911
Outro
/youtube/video/SO83KQuuZvg?t=4185
Sebastian Lague Hello, on this channel I explore how to create stuff out of code. I hope you find some of it interesting!
/youtube/channel/UCmtyQOKKmrMVaKuRXz02jbQ
Support on Patreon patreon.com
https://www.patreon.com/SebastianLague/
Coding Adventure: Solar System 825,779 views
/youtube/video/7axImc1sxa0
I Tried Creating a Game Using Real-World Geographic Data 5,797,226 views
/youtube/video/sLqXFF8mlEU