diff --git a/Readme.md b/Readme.md index 76931a7..0f68c04 100644 --- a/Readme.md +++ b/Readme.md @@ -66,4 +66,4 @@ https://github.com/user-attachments/assets/db8c7725-84dd-48df-9a3f-65605d3ab444 https://github.com/user-attachments/assets/40030308-37db-492d-a196-f830e8a39f3c -https://github.com/user-attachments/assets/0985246b-74f8-4d1c-82d8-053414c44aec \ No newline at end of file +https://github.com/user-attachments/assets/0985246b-74f8-4d1c-82d8-053414c44aec diff --git a/examples/sokol_demo/sokol_demo.odin b/examples/sokol_demo/sokol_demo.odin index 85988ad..b3c3aab 100644 --- a/examples/sokol_demo/sokol_demo.odin +++ b/examples/sokol_demo/sokol_demo.odin @@ -147,7 +147,7 @@ measure_text_size :: proc( text : string, font : Font_ID, font_size := Font_Use_ get_font_vertical_metrics :: #force_inline proc ( font : Font_ID, font_size := Font_Use_Default_Size ) -> ( ascent, descent, line_gap : f32 ) { def := demo_ctx.font_ids[ font.label ] - ascent, descent, line_gap = ve.get_font_vertical_metrics( & demo_ctx.ve_ctx, def.ve_id, font_size ) + ascent, descent, line_gap = ve.get_font_vertical_metrics( demo_ctx.ve_ctx, def.ve_id, font_size ) return } diff --git a/vefontcache/vefontcache.odin b/vefontcache/vefontcache.odin index 8c0257d..86c5af6 100644 --- a/vefontcache/vefontcache.odin +++ b/vefontcache/vefontcache.odin @@ -1144,7 +1144,7 @@ flush_draw_list_layer :: #force_inline proc( ctx : ^Context ) { // Where its assumed when utilizing the draw_list generators or shaping procedures that the shape will be affected by it so it must be handled. // If px_scalar is 1.0 no effect is done and its just redundant ops. -measure_shape_size :: #force_inline proc( ctx : ^Context, shape : Shaped_Text ) -> (measured : Vec2) { +measure_shape_size :: #force_inline proc( ctx : Context, shape : Shaped_Text ) -> (measured : Vec2) { measured = shape.size * (1 / ctx.px_scalar) return } @@ -1178,9 +1178,8 @@ measure_text_size :: #force_inline proc( ctx : ^Context, font : Font_ID, px_size return shaped.size * target_scale } -get_font_vertical_metrics :: #force_inline proc ( ctx : ^Context, font : Font_ID, px_size : f32 ) -> ( ascent, descent, line_gap : f32 ) +get_font_vertical_metrics :: #force_inline proc ( ctx : Context, font : Font_ID, px_size : f32 ) -> ( ascent, descent, line_gap : f32 ) { - assert( ctx != nil ) assert( font >= 0 && int(font) < len(ctx.entries) ) entry := ctx.entries[ font ]