When using OpenGL (or WebGL), you have to do everything yourself, including font rendering and layouting. I thought: “Wouldn’t it be great if you could just reuse the browser’s layouting and font-rendering engine instead of heaving to reinvent the wheel?”. Yes, but there’s no API for that. Or is there? TL;DR: You can use <foreignObject> to embed normal HTML content in an SVG, encode that SVG as a
![DOM2Texture: Abusing Arcane APIs — surma.dev](https://cdn-ak-scissors.b.st-hatena.com/image/square/b7f410996a1e5f607888468478d5960d6879a7f3/height=288;version=1;width=512/https%3A%2F%2Fsurma.dev%2Fthings%2Fdom2texture%2Flogo.jpg)