trumank / mint

Deep Rock Galactic mod loader and integration
MIT License
239 stars 39 forks source link

Allow all languages displayable #106

Open AichiChikuwa opened 11 months ago

AichiChikuwa commented 11 months ago

Using a different font could be an easy solution?

trumank commented 11 months ago

Not familiar with how multilingual font handling works but doesn't look like egui supports much out of the box. Here's a relevant issue on the egui repo: https://github.com/emilk/egui/issues/3060

AichiChikuwa commented 11 months ago

I found this method that may help https://docs.rs/egui/latest/egui/struct.Context.html#method.set_fonts I'll play around and see if it is going to work.

ChriStrongL commented 3 months ago

I have successfully changed the font and made Chinese displayable. The font is Noto Sans Simplified Chinese. egui has an example for it. https://github.com/emilk/egui/blob/master/examples/custom_font/src/main.rs All the changes I made are in 'src/gui/mod.rs'. I have also attached it for reference. GitHub does not allow me to upload .rs files, so it is attached as a .txt file. This will only work for Chinese, but egui uses a FontFamily that supports font fallback. So, if fonts for other languages are added, they will also work. I took a quick glance at mod.io and haven't found any other mod names in languages other than English and Chinese.

Official release version: QQ20240628-172056

Modified version: QQ20240628-172003

mod_MODIFIED.txt