ggegui icon indicating copy to clipboard operation
ggegui copied to clipboard

Changing text styles may cause an error

Open DamienPup opened this issue 1 year ago • 3 comments

Attempting to change the change the egui text styles to anything that isn't the default, such as this sample from eguis docs:

style.text_styles = [
            (Heading, FontId::new(30.0, Proportional)),
            (Name("Heading2".into()), FontId::new(25.0, Proportional)),
            (Name("Context".into()), FontId::new(23.0, Proportional)),
            (Body, FontId::new(18.0, Proportional)),
            (Monospace, FontId::new(14.0, Proportional)),
            (Button, FontId::new(14.0, Proportional)),
            (Small, FontId::new(10.0, Proportional)),
        ].into();

Or even a simpler edit like this:

style.text_styles.insert(egui::TextStyle::Heading, egui::FontId::proportional(16.0)); // reduce size of headers

May cause Error: Non-zero offset texture updates are not implemented yet to be printed to the console and the text to fail to display on screen. Sometimes it's works, sometimes it doesn't. I can't really tell what will and won't work, except for knowing that the defaults always work (regardless of which style are applied to)

DamienPup avatar May 11 '24 20:05 DamienPup

I cannot repair this due to ggez since I do not have greater control when creating textures, at another time I am going to make a change to the ggez library and if they accept it I will repair this.

NemuiSen avatar May 25 '24 00:05 NemuiSen

I'm having the same problem when applying the .size() method to the text going into a label. In the meantime, do you know of any workaround that might help?

SkuliAdams avatar Jun 05 '24 22:06 SkuliAdams