Closed limikael closed 1 year ago
The gpu cache wasn't that bad, it just needs to update its size dynamically, which it now does...
The syntax for using fonts:
#[function_component]
fn my_comp(p: MyProps, c:Elements)->Elements {
let f=use_font_data(||include_bytes!("./thefont.ttf"));
f.get_str_width("blabla",10) // the with of a line of text
apx!{
<text text="hello" font=f size=Dp(10.0)/>
}
}```
The vision is to have a use_font hook. so it would be like:
currently there is a gpu cache thingy, but it doesn't work well at all. look at: