loading .ttf files manually in odin instead of using stb_truetype or whatever, because i'm a fucking idiot or something, i dunno
but anyway check it out!! these are the right answers
so obviously it's not really working yet, but this is the first time i've seen it start to draw some recognizable shapes (!!!!)
previous pic was tracing the outlines instead of filling the shapes, because outline-tracing avoided an inside/outside bug
...but now it's fixed, so i can draw the filled shapes properly!
all the pics so far have been approximating the glyphs with line-segments-only, but today i'm upgrading it to proper quadratic-beziers
i think it'll be good-to-go once i write these two procedures!
pretty close! most of my tester-glyphs look good, but the $ symbol has gained a lil artifact
okay now we're talking!! analytic SDFs of quadratic-bezier glyphs
extra-fuzzy to show the distance-fieldiness
added support for compound-glyphs (which re-use other glyphs, instead of defining their own contours)
my buddy sam (who doesn't have a mastodon account) wrote an atlas-packer, and i fixed some bugs in the SDF generator - we're getting pretty close to something that actually renders some text!
cheeky preview of how these glyphs might look after the shader resolves the SDF (by applying a gradient-map in photoshop)
a similar preview of the same atlas, resolved after scaling up to 3x its originally-baked size (this type of scaling is the main reason you'd want to use an SDF font-atlas)
...will want to try mSDF baking eventually, but for now, this is feeling good!
more consistent padding around the glyphs (4px and 16px in the pics), some lil bugfixes
one atlas for a font can store glyphs of different sizes, also allowing it to pick a 2:1 aspect-ratio if it thinks a size like 512x256 is enough (instead of jumping up directly from 256x256 to 512x512)
we're still working on this here and there
at this point we're trying to draw some actual Print() statements to the screen
it's starting to look vaguely reminiscent of text
now that we've got visible text, i could go through and get text-alignment working in the ui tool
we didn't hook up alpha-blending in the renderer yet but i tried some quick AA on the text anyway
slightly better AA?
"goodbye, sailor" is displayed at 125% of its glyph-bake size, so the SDF rendering is doing-some-work there
@2DArray looks like there might be some slight overlap right paren between T and Y?
@seandick ahh yep, seems so!
@2DArray just for curiosity's sake, is it Sam L? if so say hi for me
@seandick it is!
@seandick he says hi back!