cad-editor/assets/fonts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven cd048165a9 feat(fonts): system TrueType support with shaping and fallback
Add a TrueType/OpenType render path alongside the LFF stroke engine so
users can pick fonts installed on their machine for text and MText.

- Discover system families via fontdb (sysfont) and list them in the
  text-style picker.
- Extract glyph outlines with ttf-parser, flattened into wire strokes
  normalized to the same 9-unit cap-height space as LFF glyphs.
- Shape runs with cosmic-text (ligatures, Arabic joining, kerning, bidi)
  plus automatic font fallback: a glyph missing from the chosen family
  is taken from another installed font.
- Unify both sources behind a single Face type; a shared run tokenizer
  drives the stroke (per-glyph) and shaped (TTF) renderers identically.
- Stroke fonts now fall back to a system TTF (cosmic-text picks it) for
  characters no LFF font covers, replacing the unicode/iso3098 chain.

Also trim the embedded LFF set from 47 to 26, keeping the AutoCAD-SHX
equivalents and dropping LibreCAD-only fonts now covered by TrueType.

LFF builtins keep priority over same-named system fonts so DXF text
renders identically across machines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:18:17 +03:00
..
cyrillic_ii.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
gothgbt.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
gothgrt.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
gothitt.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
greekc.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
greeks.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
iso.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
iso3098.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
italicc.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
italict.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
ltypeshp.lff feat(fonts): complex-linetype shapes via LFF + Turkish glyph fallback 2026-05-31 09:53:16 +03:00
romanc.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
romand.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
romans.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
romant.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
scriptc.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
scripts.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
simplex.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
standard.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
syastro.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
symap.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
symath.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
symbol.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
symeteo.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
symusic.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00
unicode.lff feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts 2026-05-31 03:31:20 +03:00