mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 04:26:18 +00:00
Fix typos and remove code that came from another example renderer
This commit is contained in:
parent
a6cf58c74c
commit
55453f8e45
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue