[video output=day171 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Font Metadata to the Asset Builder" vod_platform=youtube id=tJMvJaM-BtY annotator=Miblo annotator=debiatan] [0:25][Recap and plan for today] [4:54][We want the ability to load multiple fonts] [6:20][TODO(casey): Are there larger numbers than 4096...?][quote 180] [7:06][Using more explicit asset structs in the asset packer] [12:23][Moving the font loading code to a separate function] [17:20][Freeing the memory taken by the fonts] [18:25][We need at least a font for the game and another one for debug purposes] [19:01][Our STB code path is broken for the moment] [19:30][Making fonts available as usable assets] [20:16][AddFontAsset] [21:25][Pulling together duplicated code into AddAsset] [27:39][Hardcoding the codepoint count until we know the range of characters we want to load] [30:21][Initializing the global font device context at startup] [36:34][Building the font tables] [38:58][Writing the asset font information into the asset file] [41:41][Faking the horizontal advance using the width of the current character] [45:22][Loading the font data from the asset file] [45:45][The codepoint loading gets tricky when using more than one asset file...] [50:48][...but we can do the codepoint rebasing per file!] [57:35][Q&A][:speech] [58:05][@abnercoimbre][Give us a sec] [58:25][@garlandobloom][I tried to explain to someone that a color is just a uint32 and I am not sure I got it across] [59:01][Blackboard: "Color" -> Ambiguous term!] [1:03:46][@Robrobby][You added Textmetrics into the struct and then decided to alloc it - why? And whats the benefit?] [1:05:02][@ijustwantfood][About the language having different fonts. Would this apply to added packages by other people?] [1:06:00][@garlandobloom][I'm talking about in terms of how the GPU cares about the color of a pixel, as opposed to a struct with float r,g,b,a. Which is not really necessary for a buffer thing] [1:06:22][Blackboard: GPU \~ CPU] [1:14:07][@An0nymal][Do any systems ever represent light as an actual frequency and change that value based on interaction with the simulated environment?] [1:16:28][@cubercaleb][If you take in user input at some point will you worry about blocking Unicode control characters?] [1:16:44][@Robrobby][So you care about the stack memory. When would you start to really measure it, or is some gut feeling enough? I would never had that idea before not getting an actual error] [1:17:15][@TheSizik][What is HDR?] [1:18:51][@EnemyMouse][Do you think there will be a time when CPU and main bandwidth is fast enough to replace GPUs entirely, going back to the days of software renderers?] [1:19:12][Wind things down for dinner][:speech] [/video]