vectorcraft/crates/text/src
BFlat 079f9a8b9a Fix #296: variable fonts list and draw every named style
The font database made one style per font file, so a variable font
such as Figtree[wght].ttf listed only its default instance (Light).
Faces now also yield their fvar named instances, each a style of the
family named by its subfamily name (the default instance is the face
itself; unnamed or duplicate instances are left out; axes and
instances read are capped). The system font scan reads the fvar table
beside the name table, so installed instances are listed before the
file is loaded and found by name and by PostScript name.

An instance face carries its axis settings: skrifa draws its outlines
and reads its metrics and advances at that location, harfrust shapes
with a ShaperInstance, so layout, the canvas, Create Outlines and hit
testing all use the instance. PDF export embeds it through krilla's
Font::new_variable, SVG @font-face through subsetter's
subset_with_variations: both write a static font of that instance.

Tests build a small variable font in code (test_fonts, via
write-fonts; no font file is committed) and check listing, resolving,
glyphs and advances, PDF and SVG export and damaged fvar/gvar tables;
Bahnschrift and Segoe UI Variable are checked where installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:01:26 +07:00
..
composer.rs Live Blends/Envelopes/Gradient Mesh, Shape Builder, Live Paint, Image Trace (drawcraft-trace), Recolor Artwork, Export for Screens, Actions panel, prefs persistence, real layer thumbnails; menus bound 2026-09-30 11:02:16 -04:00
craft_fonts.rs Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 10:42:21 -04:00
edit.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00
embed.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
features.rs Type: kinsoku, tate-chu-yoko and upright placement for vertical type 2026-10-06 22:02:38 +09:00
fontdb.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
hyphen.rs Live Blends/Envelopes/Gradient Mesh, Shape Builder, Live Paint, Image Trace (drawcraft-trace), Recolor Artwork, Export for Screens, Actions panel, prefs persistence, real layer thumbnails; menus bound 2026-09-30 11:02:16 -04:00
layout.rs Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text 2026-10-07 12:16:44 +07:00
lib.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
shape.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
test_fonts.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
tests.rs Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 10:42:21 -04:00
tests_embed.rs M4.97: SVG Options choose the encoding, SVG Tiny 1.2 and embedded font subsets 2026-10-05 13:25:15 +07:00
tests_scripts.rs M4.20: Document Setup with bleed, transparency grid, paper and type options 2026-10-05 08:28:16 +07:00
tests_snap.rs M4.34: raster export options and PNG Options — resolution, background, anti-aliasing, interlacing 2026-10-05 09:14:11 +07:00
tests_sysfonts.rs Merge pull request #228 from EthanSuquet/fix/hide-dot-system-fonts 2026-10-06 15:57:48 -04:00
tests_typo.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
tests_variable.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
tests_vertical.rs Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text 2026-10-07 12:16:44 +07:00
thread.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00