1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use egui::FontId;
pub fn layout_job(text: &[(FontId, &str)]) -> egui::epaint::text::LayoutJob {
    let mut job = egui::epaint::text::LayoutJob::default();
    for (font_id, text) in text {
        job.append(
            text,
            0.0,
            egui::TextFormat {
                font_id: font_id.clone(),
                ..Default::default()
            },
        );
    }
    job
}