* Font samples sit on one baseline in a fixed band, shrunk only where their ink would leave it
A font sample was as high as its face's line (ascent, descent and line gap, the gap
below the baseline as egui lays it out) and centred in its rect, so faces with a taller
or bottom-heavy line sat higher in the picker's rows, and a face whose line was taller
than the banner's band was centred past its edge and clipped.
One rule, faces::sample_line, now serves FontSample and the picker's banner: the sample
fills a fixed band, sits on the baseline of the interface face's line at its size
centred in the band, and is laid out at its size unless its ink (the galley's mesh
bounds) would cross the band's top or bottom, then at the largest size whose ink fits.
FontSample takes its band as an option; the picker's rows set it to the thumbnail side,
as the banner's band is the large thumbnail side, and the panels keep LINE_EM of the
sample's size.
Trials: rows follow a host text that arrives after the list opened, in a CJK face; and
samples in faces with different lines sit on one baseline with their ink inside their
bands, rows and banner. Story font_picker_cjk_sample_text over the repository's Noto
Sans CJK SC subset.
* font-manager: declare the CJK test font its picker trials and story read
* font-manager: FontSample::band as a derived prop
* Swatch: the image well's mesh takes the shared UNTINTED vertex colour
* font-catalog: app start helper, font store watch and the list of changed families
app::start sets the app's folders, scans on a background thread and polls the
font store's folders, so a family the launcher installs shows at once.
app::on_activated rescans on window activation. Catalog::changes_since names
the families added, removed and changed since a generation, and
Catalog::store_changed checks only the store's folders.
* font-manager: a click on a font row's sample picks its family
* font-manager: a press on a row keeps the list the typed name filtered
* Font picker: a row pick of the family the field already holds adds no edit
* font-catalog: a rescan that finds no changed file keeps the generation
The fallback overlay was not movable, so its title row had no move band, and DocumentWindow dropped the layer's placement changes while first_placed held the window at the host's rect. DocumentWindowOutput::placed gives the rect a move or resize reached in the pass.
Each nesting level held the run's CxCore (2104 bytes), its BodyHooks (808), Begun (504), HostStep (672), BodyPlan (648), MeasurePlan and the body's and measuring sweep's Ui (376 each) by value while its children ran. They are built on the heap in the helpers that make them, and the label-column sweeps move out of sweeps. Measured on rustc 1.100, debug, Windows: 28.9 / 31.7 KB per Stack / Row level before, 22.3 / 24.0 KB after; the innermost body of body::nesting used 499 KB of the 512 KiB stack before, 384 KB after.
Story trials have no host, so document-face and texture loads ran on default_jobs' threads and a fixture
could settle before a face landed (StyleList::variants on Windows: rtl 52.0 vs 52.8, motion shapes change
after the drive). InstallSpec::jobs sets where a context's background work runs while no host is installed;
Env::jobs_of (host, else installed, else default_jobs) replaces the two copies in the face registry and the
texture loader. testing::install_spec and the suite's language hosts use InlineJobs, so a load asked for in
one pass lands in the next on every machine; the two per-story InlineJobs options go.
- The load queue is made once per context, as TextureLoader's is: without a
host, default_jobs() returned a new Arc each call, so every new face made a
new queue and dropped the loads before it.
- The begin-pass step marks a face unavailable when its load is neither
queued nor running and delivered no result (a job that panicked), so the
row stops asking for passes.
- A kept face's draw mark is journaled, so a settled view's replay marks the
faces its run drew and eviction keeps them while on screen.
- One budget over the files the registry keeps plus the files egui still
holds for faces taken out. Past it, the faces drawn longest ago go down to
half the budget and egui's fonts are made again once. The budget is a
registry field; trials set it with testing::document_face_budget.
- FacesCx::document_face takes a closure that makes the load, called only
for a new key, so a ready face clones no FaceInfo or catalog.
- Similar fonts weigh a family by its file's raw usWeightClass again
(FaceInfo::weight_class, None without OS/2; 400 then), not the scan's
weight. The review point that families without OS/2 data now join Similar
fonts was checked: the old read_traits listed them too, with zero PANOSE
and weight 400, so they stay.