cargo fmt on the merged font-manager files

This commit is contained in:
bflatastic committed 2026-11-23 02:23:41 +07:00
1 parent 0f77a22391
commit 1789a05411
2 files changed
+2 -10

No files matched your search

+1 -1
View File
@@ -2,9 +2,9 @@
//! them a few per pass, keeps the ones on screen and wakes the UI while one loads.
use craft_i18n::{Direction, base_direction};
use craft_theme::Srgba;
use craft_ui::fonts::{FaceBytes, FontRef};
use craft_ui::primitives::{ContentPainterCx, DocRun, DocText, FacesCx};
use craft_theme::Srgba;
use craft_ui::style::DataColor;
use egui::{Color32, Pos2, Rect};
+1 -9
View File
@@ -389,15 +389,7 @@ fn filter_chips(
/// The sample of a family row: `text` in the regular face of `family` at `points`, named "{shown}: {text}" as the font
/// manager names its samples, so the row keeps the family's name to itself; no face for a family the catalog
/// lacks. `on_white` sets it in black on a white paper, in every theme.
fn sample<'a>(
catalog: &'a Catalog,
infos: &'a FamilyInfos,
family: &str,
shown: &str,
text: String,
points: f32,
on_white: bool,
) -> FontSample<'a> {
fn sample<'a>(catalog: &'a Catalog, infos: &'a FamilyInfos, family: &str, shown: &str, text: String, points: f32, on_white: bool) -> FontSample<'a> {
let face =
infos.families.get(family).map_or(SampleFace::Missing, |info| SampleFace::Face { catalog, owner: Owner::Installed, face: &info.regular });
FontSample::new(format!("{shown}: {text}"), text, face, points).on_white(on_white)