cinera_handmade.network/cmuratori/hero/code/code170.hmml

46 lines
2.9 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Defining Font Metadata" vod_platform=youtube id=eIi2OYFWfdQ annotator=Miblo annotator=debiatan]
[00:11][Recap and plan for the day]
[01:24][We still need proper kerning and line spacing]
[03:05][Review of the current status of our font rendering system]
[05:14][We already support proportional fonts, but not kerning]
[08:47][Keeping track of the previous codepoint]
[11:33][GetHorizontalAdvanceForPair will tell us the kerning for two codepoints]
[13:33][Kerning will be stored using the same dimensions of the font]
[14:36][Reasons to special-case fonts instead of treating them as just a set of bitmaps]
[16:58][Pros and cons of not paging in the fonts]
[17:56][Let's load fonts dynamically]
[18:40][Finding the best-matching font]
[19:50][Calling GetFont]
[21:03][GetBitmapForGlyph will bypass the asset matching system to retrieve a glyph]
[22:50][Fonts will have their own ID type]
[23:12][Implementing GetFont]
[23:33][Defining what goes inside the font struct based on the way we use it]
[24:21][We have four functions to implement. Let's stub them out]
[30:12][Testing the hardcoded routines]
[30:52][GetBestMatchFontFrom]
[31:34][Editing the asset file font format to include the information we need]
[32:20][Filling in the loaded_font struct]
[34:55][Guarding against absent codepoints]
[38:05][Building the kerning tables]
[38:31][Introducing a separate asset type id for font glyphs]
[40:26][Deciding what goes inside hha_font]
[41:58][(aside) Metagenerated containers]
[44:32][Be a Jedi][quote 177]
[46:54][Implementing LoadFont]
[49:20][Moving some more font information out and into the asset file]
[53:16][Computing the size taken by the font data]
[54:00][Leaving the code in a compiling state]
[57:48][Try to run, expecting it to explode][quote 178]
[58:57][Q&A][:speech]
[59:20][@evraire][Did you run the asset builder?]
[1:00:28][@cubercaleb][Missed part of the stream, can you give context on why you want the meta-programming thing?]
[1:02:36][@RobotChocolateDino][How would you make the font tables more sparse so you don't need to store kerning for pairs that probably wont get drawn, like ww?]
[1:04:04][@kknewkles][People that follow development of HMH on stream, how will you protect us from spoilers?]
[1:05:08][@OMGaGiantRock][You use CodePointCount < CodePoint, but will this not fail if the first CodePoint <> 0? Or will we now need to include the ASCII control chars to make CodePointCount work?]
[1:06:42][@Apetradragon][Will you have stream later: On various meta programming tricks? Some useful & nifty tips and tricks for developers?]
[1:07:32][@ijustwantfood][Which Chinese dialect are you thinking of supporting?]
[1:08:35][@ejunkie64][How big do you think the game will be in the end?][quote 179]
[1:08:51][@OstrovskiVlad][How about right-to-left languages?]
[1:10:01][We ended the questions right as the stream ended][:speech]
[/video]