Skip to content

How much memory is needed to render a TrueType font to bitmap

nothings.org
2 pointsanitil1 comment
On HN

Comments

By Sean Barrett who I know from popularising single-header C libraries, and is apparently a known figure in the gaming world

A fun treatment of a dilema I've come across a few times when trying to limit excessive memory allocation. It's like an ourobouros of logic - in order to know the memory needed for a calculation, you need to calculate the calculation leading to a hypothetical sequence of calls like

  makeCharacterBitmapMemoryNeededMemoryNeededMemoryNeeded()
 makeCharacterBitmapMemoryNeededMemoryNeeded()
 makeCharacterBitmapMemoryNeeded()
 makeCharacterBitmap()
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.