cad-editor/assets/fonts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven c10e8dae44 fix(tolerance): draw the feature control frame properly
A tolerance drew one row of ASCII soup — "RUN | ANGtol(M) | ..." — about
a tenth of its proper size. Six defects, each independent.

Rows were split on the two-character string "^J". A DWG stores a raw
newline, and the text-DXF reader rewrites the on-disk ^J to one before we
see it, so that split never fired on either mainstream path and every row
collapsed into the first. It now normalises all four spellings the break
arrives in — including the \P our own DXF writer emits, which made
open-DWG → save-DXF → reopen asymmetric.

Symbols were replaced with ASCII labels from a table that was itself
wrong: it read r as circular runout, n as angularity, p as position. The
font's own encoding says concentricity, diameter, projected tolerance
zone, and the benchmark's pre-exploded reference agrees. That table was
an inversion of acadrust's, which is self-contradictory — it binds n to
two different meanings. Do not re-derive from it.

The frame is a proportion of the character height: a compartment spans
-h..+h about its row's centreline, so it is 2h tall and the margin falls
out of that. It was built as height + 2*DIMGAP instead, which is a
different entity's geometry — DIMGAP sizes the dimension line's break and
the rectangle around a basic dimension, where it genuinely applies twice
per axis. Even fed a self-consistent style that can only ever produce
1.5h, so it was wrong in kind rather than mis-fed.

Height came from the entity's own field, which a DWG never sets — the
reader carries only the style's handle, leaving a small non-zero default
that a "> 0" test happily used. It now resolves the style by handle first
and name second: a DWG records the handle and defaults the name, a DXF
the reverse, so matching on the name alone would have picked the wrong
style for every DWG-read tolerance. An entity may also override single
style variables on itself, and this one halves its character height that
way; ignoring that drew the frame several times too large.

Rows stacked upward, every row inherited the widest row's columns, and
one full-width border boxed them all — none of which showed while the
parse only ever produced a single row. The insertion point sits on the
first row's centreline; anchoring the frame's bottom-left there offset it
by its own height, and by an amount that changed with the row count.

Cell text ran together because the glyph run asked for no letter spacing
while the width measurement assumed the font's own, so the characters
crowded inside correctly-sized boxes. Compartments are also measured by
what they draw now: the pen advance stops one letter-space past the last
glyph, and counting that made every one of them too wide.

Symbols come from a bundled stroke font, restored from this repository's
own history: it shipped QCAD's gdt.cxf until the text engine moved from
CXF to LFF, which removed every .cxf and left nothing in their place —
the ASCII labels date from exactly there. Converted to LFF, keyed by the
letter its \Fgdt;X escape carries, and registered under that name like
any other font, so a switch to it resolves through the ordinary lookup:
an MTEXT carrying the escape, or a text style named gdt.shx, reaches it
too, with no code of their own. The geometry is public domain by explicit
waiver; provenance is in the file's header.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 22:22:07 +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
gdt.lff fix(tolerance): draw the feature control frame properly 2026-07-15 22:22:07 +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