feat(fonts): complex-linetype shapes via LFF + Turkish glyph fallback

Restore complex-linetype embedded shapes: ltypeshp is converted from the old
CXF shape file to LFF (assets/fonts/ltypeshp.lff), with the bulge moved to the
LibreCAD preceding-segment convention. The LFF parser now keeps named shapes
(blocks whose label is a word, e.g. BOX/CIRC1/ZIG) in a separate map since
their codepoints collide, exposed via lff::shape(); complex_lt::emit_shape
draws them again at the pen position.

Missing glyphs now fall back through the chosen family -> unicode -> iso3098,
so Turkish letters (Ğ ğ Ş ş İ) render in any font (dotless ı is the lone gap
iso3098 lacks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-05-31 09:53:16 +03:00
commit 50115c55d8
3 changed files with 167 additions and 35 deletions

45
assets/fonts/ltypeshp.lff Normal file
View file

@ -0,0 +1,45 @@
# Format: LibreCAD Font 1
# Name: ltypeshp
# LetterSpacing: 3
# WordSpacing: 6.75
# LineSpacingFactor: 1
[0042] BAT
0,0;-1,2;3,2,A-1;2,0
[0042] BOX
2,1;2,-1;0,-1;0,1;2,1
[0043] CIRC1
1,1;1,-1,A1;1,1,A1
[0054] TRACK1
0,-1;0,1
[005a] ZIG
0,0;1,1;2,0
[0099] PT1
0,0;0.577,1;1.154,0
[009A] PT2
0,0;0.577,-1;1.154,0
[009B] PLANT1
0,0;1.82,1.14;2.27,-0.71;3,0
[009C] PLANT2
0,0;1.41,1.61;2.63,-0.59;3.15,0
[009C] PLANT3
0,0;2.42,0.53;3.05,1.24;4.23,0
[009D] PLANT4
0,0;1.76,-0.55;3.64,1;4.63,0
[009E] PLANT5
0,0;0.42,-0.4;3.45,-0.81;2.5,0
[009F] PLANT6
0,0;2.58,-0.5;3.81,1.37;4.42,0