more perf improves for VEFontCache

This commit is contained in:
2025-01-03 01:25:05 -05:00
parent 5e0afd5b7b
commit b066b0de3a
10 changed files with 171 additions and 111 deletions

View File

@ -146,6 +146,13 @@ get_font_vertical_metrics :: #force_inline proc ( font : FontID, font_size := Fo
return
}
shape_text_cached_latin :: #force_inline proc( text : string, font : FontID, font_size := Font_Use_Default_Size, scalar : f32 ) -> ShapedText
{
ve_id, size := font_provider_resolve_draw_id( font, font_size * scalar )
shape := ve.shape_text_latin( & get_state().font_provider_ctx.ve_ctx, ve_id, text )
return shape
}
shape_text_cached :: #force_inline proc( text : string, font : FontID, font_size := Font_Use_Default_Size, scalar : f32 ) -> ShapedText
{
ve_id, size := font_provider_resolve_draw_id( font, font_size * scalar )