Fix typos and remove code that came from another example renderer

This commit is contained in:
Matt Breckon 2025-08-24 12:11:29 +01:00
parent a6cf58c74c
commit 55453f8e45

View file

@ -25,13 +25,13 @@ measure_text :: proc "c" (text: clay.StringSlice, config: ^clay.TextElementConfi
for byte_index < int(text.length) { for byte_index < int(text.length) {
// handle utf-8 codepoints // handle utf-8 codepoints
codepoint_bytes: i32 = 0 codepoint_bytes: i32 = 0
codepoint := raylib.GetCodepoint( codepoint := rl.GetCodepoint(
transmute(cstring)&text.chars[byte_index], transmute(cstring)&text.chars[byte_index],
&codepoint_bytes, &codepoint_bytes,
) )
byte_index += int(codepoint_bytes) byte_index += int(codepoint_bytes)
glyph_index := raylib.GetGlyphIndex(fontToUse, codepoint) glyph_index := rl.GetGlyphIndex(font, codepoint)
glyph := font.glyphs[glyph_index] glyph := font.glyphs[glyph_index]
if glyph.advanceX != 0 { if glyph.advanceX != 0 {