mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
The tab family's copies of the semibold faces took the copy made for egui's empty Proportional family, which has no baseline shift, instead of the one made for the tab family. They now take the tab family's copy. egui's own faces stay under their own names, as in the semibold family: egui skips some of their characters (the Ubuntu logo, two symbols in its emoji face) only under those names. ui_fonts::baseline_copies measured a fallback face without its own FontTweak scale, while egui draws the face and its y_offset_factor at that scale. The shift now uses it, so a scaled fallback (Inter SemiBold at 0.92) sits on the row's baseline. Faces added before this change are at scale 1 and keep their shift. Without the condensed face the tab family is no longer bound, and tabs draw in theme::tab_title_font: the tab family when the context's fonts bind it, otherwise the semibold family as it is. Fonts an embedder adds to the semibold family then reach tab titles too, and an embedder's own definitions that bind only the other families keep working. The condensed face and the lookup of its catalog row move to build/condensed_ui_face.rs, which the crate's tests include. With CRAFT_FONTS_REQUIRED=1, an unreadable catalog, a malformed row for the face or a row whose file can't be embedded is a build error; a checkout without the catalog or the row still gives a warning. A checkout whose catalog names the condensed face without its file is watched through the file's folder inside the checkout, so the build runs again once the file appears. docs/development.md lists FONT_TAB among the families an embedder adds fonts to. ASSETS.md and NOTICE name the face, and the docs/ui-parity.md row says official builds wait for the craft-fonts pin to move. Tests: with the monospace face standing in for the condensed face, and without craft-fonts, one test checks the tab family's x-height, the baseline of a character only the semibold face has, and that the characters egui skips draw in a tab title as in semibold text. Two tab-strip tests check that titles are laid out in the tab family with a stand-in face and in the semibold family without one. The condensed-face test checks the x-height at 200 pt, the shortened-title test also runs in the tab font, the install_fonts test checks the tab family, and ui_fonts' no-craft-fonts test allows the condensed face, which a checkout can give alone. A text-crate test finds the face's row as craft-fonts' catalog has it and rejects malformed rows for it. Two comments use American spelling.