cad-editor/assets/fonts/iso.lff
Hakan Seven c1b33677e2 feat(fonts): switch the text engine from CXF to LibreCAD LFF fonts
Replace the small QCAD CXF stroke-font set with the full LibreCAD LFF font
library (46 fonts) and a new LFF parser/engine in src/scene/lff.rs. The
parser reads the `[hex] char` glyph blocks, tessellates `,A<bulge>` arcs, and
resolves `C<hex>` glyph references. Per LibreCAD's RS_Polyline convention a
vertex's bulge curves the segment ending at that vertex — getting this wrong
turned round letters like O into sideways capsules.

Font name resolution mirrors LibreCAD: match by file stem, map common
AutoCAD/DXF SHX names (txt, isocp, complex, italic, gothic*, gost, …) to the
nearest LFF family, and fall back to `standard`. A missing glyph in the chosen
family falls back to the broad `unicode` font so accented/Cyrillic/Greek text
still renders. Cap height stays 9 units, so the text scale is unchanged.

All text consumers move from cxf:: to lff::; complex linetypes still render
embedded text but no longer draw embedded shapes (LibreCAD ships no shape
file). The CXF module and every *.cxf asset are removed, and the MText / text
style font pickers list the LFF families.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 03:31:20 +03:00

875 lines
10 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Format: LibreCAD Font 1
# Creator: LibreCAD
# Name: ISO 3098-2
# Version: master
# Encoding: UTF-8
# LetterSpacing: 3
# WordSpacing: 6.75
# LineSpacingFactor: 1
# Created: 2011-09-25
# Last modified: 2013-04-09
# Author: Rallaz <rallazz@gmail.com>
# License: GPL v2 or later
#
# Notes: - This font is based in the file
# http://commons.wikimedia.org/wiki/File:ISO3098.svg
# released as public domain.
[0021] !
0,0;0,0.5
0,3;0,9
[0022] "
0.5,7;1,9
3,7;3.5,9
[0023] #
1.5,0;1.5,9
4.5,0;4.5,9
0,6;6,6
0,3;6,3
[0024] $
2,0;2,9
0,1.5;2.39,1,A0.0935;3.235,3.81,A0.8;0.7685,5.19;1.6125,8,A-0.8;4,7.5,A-0.09
[0025] %
0,0;8,9
3,7.5;0,7.5,A1;3,7.5,A1
8,1.5;5,1.5,A1;8,1.5,A1
[0026] &
5,0;0.735,6.694;3.234,6.6472,A-1.8641;0.2660,2.3528;2.4,0.3,A0.8505;6,3
[0027] '
0.5,7;1,9
[0028] (
1,10;1,-1,A0.181818
[0029] )
0,-1;0,10,A0.181818
[002a] *
2.8532,6;2.8532,3
0,3.927;2.8532,3;5.7,3.927
1.09,0.573;2.8532,3;4.6165,0.573
[002b] +
0,4;4,4
2,2;2,6
[002c] ,
0,-2;0.5,0
[002d] -
0,3;4,3
[002e] .
0,0;0,0.5
[002f] /
0,0;4,9
[0030] 0
3,8.5;1,8.5,A0.5;1,0.5,A0.25;3,0.5,A0.5;3,8.5,A0.25
[0031] 1
0,7;2,9;2,0
[0032] 2
0,7.5;0.26795,8;3.73205,6,A-1;0,0;4,0
[0033] 3
0,9;2,9;2,5,A-1
1,5;2,5;4,3,A-0.414214;4,2;2,0,A-0.414214;0,0
[0034] 4
2,9;0,2;5,2
3.5,4;3.5,0
[0035] 5
4,9;0,9;0,5;2,5;4,3,A-0.414214;4,2;2,0,A-0.414214;0,0
[0036] 6
0,5;2,5;4,3,A-0.414214;4,2;0,2,A-1;0,5;3,9,A-0.333333
[0037] 7
0,8;0,9;4,9;2,0
[0038] 8
4,2;4,3;0,3,A1;0,2;4,2,A1
2,5;2,9,A1;2,5,A1
[0039] 9
4,4;2,4;0,6,A-0.414214;0,7;4,7,A-1;4,4;1,0,A-0.333333
[003a] :
0,0.5;0,1
0,4.5;0,5
[003b] ;
0,-2;0.5,0
0.5,3.5;0.5,4
[003c] <
4,1.5;0,3;4,4.5
[003d] =
0,1.5;4,1.5
0,4.5;4,4.5
[003e] >
0,1.5;4,3;0,4.5
[003f] ?
0,8.5;2.5,9,A-0.0979529;3.54532,6.42422,A-0.673383;2.30305,5.21712;2,4.5,A0.20262;2,3
2,0.5;2,0
[0040] @
5.5,1.5;2.5,1.5,A-1;2.5,4.5;4,6,A-0.414214;5.5,6;5.5,1.25;8,1.25,A1;8,5;0,5,A1;0,0.5;3.5,-3,A0.414214
[0041] A
0.8333,2.5;5.1666,2.5
0,0;3,9;6,0
[0042] B
2.5,5;0,5
2.5,5;2.5,9,A1;0,9;0,0;2.5,0;2.5,5,A1
[0043] C
4,0;2,0;0,2,A-0.414214;0,7;2,9,A-0.414214;4,9
[0044] D
0,0;3,0;5,2,A0.414214;5,7;3,9,A0.414214;0,9;0,0
[0045] E
4,0;0,0;0,9;4,9
0,5;3,5
[0046] F
0,0;0,9;4,9
0,5;4,5
[0047] G
3.5,5;5,5;5,0;2,0;0,2,A-0.414214;0,7;2,9,A-0.414214;5,9
[0048] H
0,0;0,9
5,0;5,9
0,5;5,5
[0049] I
0,0;0,9
[004a] J
0,0;1,0;3,2,A0.414214;3,9
[004b] K
0,0;0,9
5,9;0,3.5
5,0;1.8858,5.5744
[004c] L
0,9;0,0;4,0
[004d] M
0,0;0,9;3,4;6,9;6,0
[004e] N
0,0;0,9;5,0;5,9
[004f] O
5,2.5;0,2.5,A-1;0,6.5;5,6.5,A-1;5,2.5
[0050] P
0,0;0,9;2.5,9;2.5,4,A-1;0,4
[0051] Q
C004f
6,0;4,2
[0052] R
C0050
5,0;2.97871,4.04626
[0053] S
0,1;3,0,A0.162278;3.90857,3.78171,A0.788202;1.09143,5.21829;2,9,A-0.788202;4.5,8.5,A-0.0990195
[0054] T
0,9;5,9
2.5,9;2.5,0
[0055] U
0,9;0,2.5;5,2.5,A1;5,9
[0056] V
0,9;3,0;6,9
[0057] W
0,9;2,0;4,6;6,0;8,9
[0058] X
0,0;6,9
0,9;6,0
[0059] Y
0,9;3,5;6,9
3,0;3,5
[005a] Z
0,9;5,9;0,0;5,0
[005b] [
1,-1;0,-1;0,10;1,10
[005c] \
0,9;4,0
[005d] ]
0,-1;1,-1;1,10;0,10
[005e] ^
0,8.5;1.5,10;3,8.5
[005f] _
0,-3;11,-3
[0060] `
0,10;2,8.5
[0061] a
0.5,6;2.5,6;4,4.5,A-0.414214;4,0;1.5,0;1.5,3,A-1;4,3
[0062] b
0,9;0,0;2.5,0;4,1.5,A0.414214;4,4.5;2.5,6,A0.414214;0,6
[0063] c
3,6;1.5,6;0,4.5,A0.414214;0,1.5;1.5,0,A0.414214;3,0
[0064] d
4,9;4,0;1.5,0;0,1.5,A-0.414214;0,4.5;1.5,6,A-0.414214;4,6
[0065] e
4,0;1.5,0;0,1.5,A-0.414214;0,4;4,4,A-1;4,3;0,3
[0066] f
1,0;1,7.5;2.5,9,A-0.414214;3,9
0,6;3,6
[0067] g
0.5,-3;2.5,-3;4,-1.5,A0.414214;4,6;1.5,6;0,4.5,A0.414214;0,1.5;1.5,0,A0.414214;4,0
[0068] h
0,0;0,9
0,6;2.5,6;4,4.5,A-0.414214;4,0
[0069] i
0,0;0,6
0,8.5;0,9
[006a] j
0,-3;0.5,-3;2,-1.5,A0.414214;2,6
2,8.5;2,9
[006b] k
0,9;0,0
0,3;4,6
4,0;1.7361,4.30208
[006c] l
0,9;0,1;1,0,A0.414214
[006d] m
3,0;3,6
0,0;0,6;4.5,6;6,4.5,A-0.414214;6,0
[006e] n
0,0;0,6;2.5,6;4,4.5,A-0.414214;4,0
[006f] o
4,2;0,2,A-1;0,4;4,4,A-1;4,2
[0070] p
0,-3;0,6;2.5,6;4,4.5,A-0.4142;4,1.5;2.5,0,A-0.4142;0,0
[0071] q
4,-3;4,6;1.5,6;0,4.5,A0.4142;0,1.5;1.5,0,A0.4142;4,0
[0072] r
0,0;0,6;3,6;3,5
[0073] s
0,0.5;2.75,0,A0.0903;3.2934,2.3757,A0.7971;0.7066,3.6243;1.25,6,A-0.8;3.5,5.5,A-0.1085
[0074] t
1,0;1,9
0,6;3,6
[0075] u
0,6;0,1.5;1.5,0,A0.414214;4,0;4,6
[0076] v
0,6;2,0;4,6
[0077] w
0,6;1.5,0;3,4;4.5,0;6,6
[0078] x
0,0;4,6
0,6;4,0
[0079] y
4,6;1,-3;0,-3
0,6;2,0
[007a] z
0,6;4,6
4,6;0,0
0,0;4,0
[007b] {
2,10;1,9,A0.414214;1,5.5;0,4.5,A-0.414214;1,3.5,A-0.414214;1,0;2,-1,A0.414214
[007c] |
0,-3;0,9
[007d] }
0,10;1,9,A-0.414214;1,5.5;2,4.5,A0.414214;1,3.5,A0.414214;1,0;0,-1,A-0.414214
[007e] ~
0,2.5;0.4,2.8;1.6,2.8,A-0.3333;2.4,2.2;3.6,2.2,A0.3333;4,2.5
[00A1] !
0,0;0,6
0,8.5;0,9
[00A2] ¢
2.5,-1.5;2.5,7.5
4,6;1.5,6;0,4.5,A0.4142;0,1.5;1.5,0,A0.4142;4,0
[00A3] £
0,4.5;3.5,4.5
5.5,7;1.5,7,A1;1.5,1.5;0,0,A-0.4142;4.5,0;6,1.5,A0.4142
[00A4] ¤
0.25,4.5;2.75,4.5,A1;0.25,4.5,A1
0,3;0.6161,3.6161
0,6;0.6161,5.3838
3,6;2.3838,5.3838
3,3;2.3838,3.6161
[00a5] ¥
C0059
1.5,5;4.5,5
1.5,4;4.5,4
[00a6] ¦
0,0;0,3.5
0,5.5;0,9
[00a7] §
2,6;1.25,6;0.7066,3.6243,A0.7971;3.2934,2.3757;2.75,0,A-0.8;0.5,0.5,A-0.1085
2,3;2.75,3;3.2934,5.3757,A0.7971;0.7066,6.6243;1.25,9,A-0.8;3.5,8.5,A-0.1085
[00a8] ¨
0,8.5;0,9
3,8.5;3,9
[00a9] ©
8,5;0,5,A1;8,5,A1
5,7;3.5,7;2.5,6,A0.4142;2.5,4;3.5,3,A0.4142;5,3
[00aa] ª
0.375,9;1.875,9;3,7.875,A-0.414214;3,4.5;1.125,4.5;1.125,6.75,A-1;3,6.75
[00ab] «
2,0.5;0,3;2,5.5
5,0.5;3,3;5,5.5
[00ac] ¬
0,5.5;4,5.5;4,3.5
[00ad] ­
0,11;5,11
[00Ae] ®
8,5;0,5,A1;8,5,A1
3,3;3,7;4,7;4,5,A-1
5,3;4,5;3,5
[00b0] °
0,7.5;3,7.5,A1;0,7.5,A1
[00b1] ±
C002b
0,0;4,0
[00b2] ²
0,8.25;0.134,8.5;1.866,7.5,A-1;0,4.5;2,4.5
[00b3] ³
0,9;1,9;1,7,A-1
0.5,7;1,7;2,6,A-0.4142;2,5.5;1,4.5,A-0.4142;0,4.5
[00b4] ´
0,8.5;2,10
[00b5] µ
C0075
0,1.5;0,-3
[00b6] ¶
5,9;2.5,9;2.5,4,A1;3,4
3,0;3,9
4,0;4,9
[00b7] ·
0,3.5;0,4
[00b8] ¸
0.5,0;0,-2
[00b9] ¹
0,8;1,9;1,4.5
[00ba] º
3,6;0,6,A-1;0,7.5;3,7.5,A-1;3,6
[00bb] »
0,0.5;2,3;0,5.5
3,0.5;5,3;3,5.5
[00bc] ¼
C00b9
0,0;6,9
4.5,5;3.5,1.5;6,1.5
5.25,0;5.25,2.5
[00bd] ½
C00b9
0,0;6,9
4,4.25;4.134,4.5;5.866,3.5,A-1;4,0.5;6,0.5
[00be] ¾
C00b3
0,0;6,9
4.5,5;3.5,1.5;6,1.5
5.25,0;5.25,2.5
[00bf] ¿
2,9;2,8.5
4,0.5;1.5,0,A-0.098;0.4547,2.5758,A-0.6734;1.697,3.7829;2,4.5,A0.2026;2,6
[00c0] À
C0041
2,13;4,11.5
[00c1] Á
C0041
2,11.5;4,13
[00c2] Â
C0041
1.5,11.5;3,13;4.5,11.5
[00c3] Ã
C0041
1,12.5;1.4,12.8;2.6,12.8,A-0.3333;3.4,12.2;4.6,12.2,A0.3333;5,12.5
[00c4] Ä
C0041
1.5,11.5;1.5,12
4.5,11.5;4.5,12
[00c5] Å
C0041
4.25,11.75;1.75,11.75,A1;4.25,11.75,A1
[00c6] Æ
0,0;3,9;8,9
5,9;5,0;8,0
5,5;7.5,5
0.8333,2.5;5,2.5
[00c7] Ç
C0043
2,0;1.5,-2
[00c8] È
C0045
1,13;3,11.5
[00c9] É
C0045
1,11.5;3,13
[00ca] Ê
C0045
0.5,11.5;2,13;3.5,11.5
[00cb] Ë
C0045
0.5,11.5;0.5,12
3.5,11.5;3.5,12
[00cc] Ì
1,0;1,9
0,13;2,11.5
[00cd] Í
1,0;1,9
0,11.5;2,13
[00ce] Î
1.5,0;1.5,9
0,11.5;1.5,13;3,11.5
[00cf] Ï
1.5,0;1.5,9
0,11.5;0,12
3,11.5;3,12
[00d0] Ð
1.5,0;4.5,0;6.5,2,A0.414214;6.5,7;4.5,9,A0.414214;1.5,9;1.5,0
0,4.5;3,4.5
[00d1] Ñ
C004E
0.5,12.5;0.9,12.8;2.1,12.8,A-0.3333;2.9,12.2;4.1,12.2,A0.3333;4.5,12.5
[00d2] Ò
C004F
1.5,13;3.5,11.5
[00d3] Ó
C004F
1.5,11.5;3.5,13
[00d4] Ô
C004F
1,11.5;2.5,13;4,11.5
[00d5] Õ
C004F
0.5,12.5;0.9,12.8;2.1,12.8,A-0.3333;2.9,12.2;4.1,12.2,A0.3333;4.5,12.5
[00d6] Ö
C004F
1,11.5;1,12
4,11.5;4,12
[00d7] ×
0,1;4,5
0,5;4,1
[00d8] Ø
6,2.5;1,2.5,A-1;1,6.5;6,6.5,A-1;6,2.5
0,0.5;7,8.5
[00d9] Ù
C0055
1.5,13;3.5,11.5
[00da] Ú
C0055
1.5,11.5;3.5,13
[00db] Û
C0055
1,11.5;2.5,13;4,11.5
[00dc] Ü
C0055
1,11.5;1,12
4,11.5;4,12
[00dd] Ý
C0059
2,11.5;4,13
[00de] Þ
0,0;0,7;2.5,7;4,5.5,A-0.4142;4,3.5;2.5,2,A-0.4142;0,2
0,6;0,9
[00df] ß
0,0;0,7.5;1.5,9,A-0.4142;3.5,9;5,7.5,A-0.4142;5,7;3.5,5.5,A-0.4142;5,4,A-0.4142;5,1.5;3.5,0,A-0.4142
[00e0] à
C0061
1,10;3,8.5
[00e1] á
C0061
1,8.5;3,10
[00e2] â
C0061
0.5,8.5;2,10;3.5,8.5
[00e3] ã
C0061
0,9;0.4,9.3;1.6,9.3,A-0.3333;2.4,8.7;3.6,8.7,A0.3333;4,9
[00e4] ä
C0061
0.5,8.5;0.5,9
3.5,8.5;3.5,9
[00e5] å
C0061
3.25,9.75;0.75,9.75,A1;3.25,9.75,A1
[00e6] æ
0.5,6;1.5,6;3,4.5,A-0.4142;3,0;1.5,0;1.5,3,A-1;6,3;6,4.5;3,4.5,A1
3,1.5;4.5,0,A0.4142;6,0
[00e7] ç
C0063
1.5,0;1,-2
[00e8] è
C0065
1,10;3,8.5
[00e9] é
C0065
1,8.5;3,10
[00ea] ê
C0065
0.5,8.5;2,10;3.5,8.5
[00eb] ë
C0065
0.5,8.5;0.5,9
3.5,8.5;3.5,9
[00ec] ì
1,0;1,6
0,10;2,8.5
[00ed] í
1,0;1,6
0,8.5;2,10
[00ee] î
1.5,0;1.5,6
0,8.5;1.5,10;3,8.5
[00ef] ï
1.5,0;1.5,6
0,8.5;0,9
3,8.5;3,9
[00f0] ð
4,3;0,3,A1;0,2;4,2,A1;4,5;1,9,A0.3333
0.5114,7;3,9,A-0.2
[00f1] ñ
C006e
0,9;0.4,9.3;1.6,9.3,A-0.3333;2.4,8.7;3.6,8.7,A0.3333;4,9
[00f2] ò
C006f
1,10;3,8.5
[00f3] ó
C006f
1,8.5;3,10
[00f4] ô
C006f
0.5,8.5;2,10;3.5,8.5
[00f5] õ
C006f
0,9;0.4,9.3;1.6,9.3,A-0.3333;2.4,8.7;3.6,8.7,A0.3333;4,9
[00f6] ö
C006f
0.5,8.5;0.5,9
3.5,8.5;3.5,9
[00f7] ÷
0,3;4,3
2,0.5;2,1
2,5;2,5.5
[00f8] ø
5,2;1,2,A-1;1,4;5,4,A-1;5,2
0,0;6,6
[00f9] ù
C0075
1,10;3,8.5
[00fa] ú
C0075
1,8.5;3,10
[00fb] û
C0075
0.5,8.5;2,10;3.5,8.5
[00fc] ü
C0075
0.5,8.5;0.5,9
3.5,8.5;3.5,9
[00fd] ý
C0079
1,8.5;3,10
[00fe] þ
C0070
0,6;0,9
[00ff] ÿ
C0079
0.5,8.5;0.5,9
3.5,8.5;3.5,9
[0100] Ā
C0041
0.5,12;5.5,12
[0101] ā
C0061
0.5,8.5;3.5,8.5
[0102] Å
C0041
1.75,11.75;4.25,11.75,A1
[0104] Ą
C0041
6,0;6,-2,A0.5
[0105] ą
C0061
4,0;4,-2,A0.5
[0106] Ć
C0043
1.5,11.5;3.5,13
[0107] ć
C0063
1,8.5;3,10
[010C] Č
C0043
0.5,13;2,11.5;3.5,13
[0112] Ē
C0045
0.5,12;3.5,12
[0113] ē
C0065
0.5,8.5;3.5,8.5
[0118] Ę
C0045
4,0;4,-2,A0.5
[0119] ę
C0065
4,0;4,-2,A0.5
[0141] Ł
1,9;1,0;5,0
0,3;2.5,5
[0142] ł
1,9;1,1;2,0,A0.414214
0,3;2,5
[0143] Ń
C004e
1.5,11.5;3.5,13
[0144] ń
C006e
1,8.5;3,10
[0153] œ
C006f
8,0;5.5,0;4,1.5,A-0.4142;4,4;8,4,A-1;8,3;4,3
[015a] Ś
C0053
1.5,11.5;3.5,13
[015b] ś
C0073
1,8.5;3,10
[0160] Š
C0053
1,13;2.5,11.5;4,13
[0161] š
C0073
0.5,10;2,8.5;3.5,10
[01cd] Ǎ
C0041
1.5,13;3,11.5;4.5,13
[0168] Ũ
C0055
0.5,12.5;0.9,12.8;2.1,12.8,A-0.3333;2.9,12.2;4.1,12.2,A0.3333;4.5,12.5
[0179] Ź
C005a
1.5,11.5;3.5,13
[017a] ź
C007a
1,8.5;3,10
[017b] Ż
C005a
2.5,11.5;2.5,12
[017c] ż
C007a
2,10.5;2,11
[017d] Ž
C005a
1,13;2.5,11.5;4,13
[017e] ž
C007a
0.5,10;2,8.5;3.5,10
[02c7] ˇ
0,10;1.5,8.5;3,10
[02d8] ˘
0,11.75;2.5,11.75,A1
[2075] ⁵
2,9;0,9;0,7;1,7;2,6,A-0.207107;2,5.5;1,4.5,A-0.207107;0,4.5
[2205] ∅
1.5,0;4.5,9
0,4.5;6,4.5,A1;0,4.5,A1
[2264] ≤
0,0.5;4,0.5
4,6;0,4.5;4,3
[2265] ≥
0,0.5;4,0.5
0,3;4,4.5;0,6
[2300] ⌀
1.5,0;4.5,9
0,4.5;6,4.5,A1;0,4.5,A1
[fffd] <20>
1,0;0,2;1,4;2,2;1,0