mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
egui037: rustfmt the eager craft-font order
This commit is contained in:
1 file changed
+2
-4
@@ -881,10 +881,8 @@ pub fn install_fonts_with(ctx: &egui::Context, cjk: crate::cjk_fonts::Sources) {
|
||||
// before BIZ UDPGothic, so manifest order alone would draw Japanese UI in serif glyphs
|
||||
// and shared Han characters in Japanese forms.
|
||||
let craft = photocraft_text::craft_fonts::CRAFT_FONTS;
|
||||
let ui_first: Vec<usize> = photocraft_text::craft_fonts::japanese_for_ui()
|
||||
.iter()
|
||||
.filter_map(|f| craft.iter().position(|c| std::ptr::eq(c, *f)))
|
||||
.collect();
|
||||
let ui_first: Vec<usize> =
|
||||
photocraft_text::craft_fonts::japanese_for_ui().iter().filter_map(|f| craft.iter().position(|c| std::ptr::eq(c, *f))).collect();
|
||||
let order = ui_first.iter().copied().chain((0..craft.len()).filter(|i| !ui_first.contains(i)));
|
||||
for i in order {
|
||||
let f = &craft[i];
|
||||
|
||||
Reference in new issue
Block a user