@heroiclands/fonts 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +93 -0
- package/README.md +130 -2
- package/encoding/khelathi-zethu-glyphs.json +483 -0
- package/encoding/qalezu-hand.json +108 -0
- package/fonts/KhelathiZethuGlyphs-Regular.ttf +0 -0
- package/fonts/KhelathiZethuGlyphs-Regular.woff2 +0 -0
- package/fonts/PirzathCarved-Regular.ttf +0 -0
- package/fonts/PirzathCarved-Regular.woff2 +0 -0
- package/fonts/PirzathHand-Regular.ttf +0 -0
- package/fonts/PirzathHand-Regular.woff2 +0 -0
- package/fonts/QalezuHand-Regular.ttf +0 -0
- package/fonts/QalezuHand-Regular.woff2 +0 -0
- package/fonts/SemaronKuriale-Regular.ttf +0 -0
- package/fonts/SemaronKuriale-Regular.woff2 +0 -0
- package/fonts/ThuravarkCarved-Regular.ttf +0 -0
- package/fonts/ThuravarkCarved-Regular.woff2 +0 -0
- package/fonts.css +41 -0
- package/package.json +53 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright (c) 2026 Tom Rodriguez ("Toasty") — <toasty@heroiclands.org>
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,131 @@
|
|
|
1
|
-
#
|
|
1
|
+
# fonts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fonts for the scripts of the HeroicLands settings, drawn from scratch so that a setting's inscriptions can be shown in their own letters on the sites, in the books and in Foundry.
|
|
4
|
+
|
|
5
|
+
Pirzath Carved and Thuravark Carved draw their script over the setting's Latin spelling. Text stays plain, readable and searchable, and a passage switches to the script by its font alone. A letter pair that the spelling uses for one sound, such as _th_ or _kh_, draws the single letter for that sound.
|
|
6
|
+
|
|
7
|
+
Semaron Kuriale, the Vylarian chancery hand, draws the Vylari spelling in majuscules and minuscules: a doubled vowel types the long vowel's curl, a catch after a letter types the grave over it, and every pause types the one point.
|
|
8
|
+
|
|
9
|
+
Qalezu, the Khelathi alphabet, is written right to left on code points of its own, U+1EA00 to U+1EA3F, with the catch-before forms in U+1ECC0 to U+1ECFF. A converter turns Latin Khelathi into those code points, and the font draws them; `tools/qalezu-hand/encoding.json` is the one table of what each code point is, its sound and the Latin that types it.
|
|
10
|
+
|
|
11
|
+
## Licence
|
|
12
|
+
|
|
13
|
+
The fonts are licensed under the SIL Open Font License 1.1; see `LICENSE`. Under it they may be embedded in web pages, documents and books, and bundled with software, without that work taking on the font's licence.
|
|
14
|
+
|
|
15
|
+
## Installing and using the fonts
|
|
16
|
+
|
|
17
|
+
The fonts are published to npm as `@heroiclands/fonts`. The package holds each font as WOFF2 and TrueType, `fonts.css` with one `@font-face` rule per family, and `encoding/`, the code-point tables of the right-to-left fonts.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install @heroiclands/fonts
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Web.** Import the stylesheet from a bundler or a stylesheet, or link it:
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
@import "@heroiclands/fonts/fonts.css";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@heroiclands/fonts@0/fonts.css" />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The jsDelivr form is `https://cdn.jsdelivr.net/npm/@heroiclands/fonts@<version>/<file>`. `@0` follows the newest 0.x release, and a full version pins one. A rule's URLs are relative, so every file resolves beside the stylesheet. A family is named by its font-family, such as `font-family: "Pirzath Carved"`.
|
|
34
|
+
|
|
35
|
+
**Foundry VTT.** A module ships the files it needs from its own folder, then registers each family either by importing `fonts.css` from its stylesheet or through `CONFIG.fontDefinitions`, so every client loads it:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
CONFIG.fontDefinitions["Pirzath Carved"] = {
|
|
39
|
+
editor: true,
|
|
40
|
+
fonts: [{ urls: ["modules/<module id>/fonts/PirzathCarved-Regular.woff2"] }],
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Typst.** Point the compiler's font path at the package's `fonts/` folder, and name the family in `#set text(font: "Qalezu Hand")`:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
typst compile --font-path node_modules/@heroiclands/fonts/fonts book.typ
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The right-to-left fonts take their text as code points of their own; `encoding/<font>.json` is the table of what each code point is.
|
|
51
|
+
|
|
52
|
+
The fonts are licensed under the SIL Open Font License 1.1, which `LICENSE` carries in the package.
|
|
53
|
+
|
|
54
|
+
## Setting up
|
|
55
|
+
|
|
56
|
+
Install the dependencies, which also activates the repository's git hooks:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npm ci
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Create the virtual environment:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
python3 -m venv .venv
|
|
66
|
+
.venv/bin/pip install -r requirements.txt
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The source of each font is a UFO under `sources/`: `PirzathCarved.ufo`, `PirzathHand.ufo`, `ThuravarkCarved.ufo`, `QalezuHand.ufo`, `KhelathiZethuGlyphs.ufo` and `SemaronKuriale.ufo`. Open one in FontForge, Glyphs or RoboFont to edit it. The UFO carries the outlines, the character map, the metrics and `features.fea`, which holds every OpenType feature.
|
|
70
|
+
|
|
71
|
+
Build the fonts into `fonts/`. The build is reproducible, so the committed fonts match a fresh build byte for byte:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
PATH=.venv/bin:$PATH ./build.sh
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`build.sh` runs `fontmake` and compresses the `.woff2`, once per font (`PirzathCarved` shown), then runs `tools/write_css.py`, which writes `fonts.css` from the built fonts' name tables and copies the right-to-left fonts' `encoding.json` into `encoding/`:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
export SOURCE_DATE_EPOCH=1767225600
|
|
81
|
+
fontmake -u sources/PirzathCarved.ufo -o ttf --keep-overlaps --no-production-names \
|
|
82
|
+
--output-path fonts/PirzathCarved-Regular.ttf
|
|
83
|
+
fonttools ttLib.woff2 compress -o fonts/PirzathCarved-Regular.woff2 fonts/PirzathCarved-Regular.ttf
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Check the package holds exactly what it should, and that the formatting is clean:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
npm run check:package
|
|
90
|
+
npm run format:check
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Check the built fonts, render the specimens, and prove that each guard fails a broken font:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
.venv/bin/python tools/pirzath/check_font.py
|
|
97
|
+
.venv/bin/python tools/pirzath-hand/check_font.py
|
|
98
|
+
.venv/bin/python tools/thuravark-carved/check_font.py
|
|
99
|
+
.venv/bin/python tools/qalezu-hand/check_font.py
|
|
100
|
+
.venv/bin/python tools/khelathi-zethu-glyphs/check_font.py
|
|
101
|
+
.venv/bin/python tools/semaron-kuriale/check_font.py
|
|
102
|
+
.venv/bin/python tools/notdef_box.py
|
|
103
|
+
.venv/bin/python tools/font_names.py
|
|
104
|
+
.venv/bin/python tools/pirzath/specimens.py # specimens/pirzath/
|
|
105
|
+
.venv/bin/python tools/pirzath-hand/specimens.py # specimens/pirzath-hand/
|
|
106
|
+
.venv/bin/python tools/thuravark-carved/specimens.py # specimens/thuravark-carved/
|
|
107
|
+
.venv/bin/python tools/qalezu-hand/specimens.py # specimens/qalezu-hand/
|
|
108
|
+
.venv/bin/python tools/khelathi-zethu-glyphs/specimens.py # specimens/khelathi-zethu-glyphs/
|
|
109
|
+
.venv/bin/python tools/semaron-kuriale/specimens.py # specimens/semaron-kuriale/
|
|
110
|
+
.venv/bin/python tools/prove_guards.py
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Each guard shapes every form of its lexicon and asserts the font renders it rightly; the Pirzath guards read the Khazari lexicon, the Thuravark guard the Nordmal one, Semaron Kuriale's the Vylari one, and Qalezu's converts the Khelathi lexicon from Latin first. Each reads its lexicon from the `origin/main` of a local thalorna checkout, `~/dev/HeroicLands/thalorna` by default:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
.venv/bin/python tools/pirzath/guard.py --thalorna /path/to/thalorna
|
|
117
|
+
.venv/bin/python tools/pirzath-hand/guard.py --thalorna /path/to/thalorna
|
|
118
|
+
.venv/bin/python tools/thuravark-carved/guard.py --thalorna /path/to/thalorna
|
|
119
|
+
.venv/bin/python tools/qalezu-hand/guard.py --thalorna /path/to/thalorna
|
|
120
|
+
.venv/bin/python tools/semaron-kuriale/guard.py --thalorna /path/to/thalorna
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Qalezu's character map follows from `encoding.json`; after editing that file, `.venv/bin/python tools/qalezu-hand/apply_encoding.py` rewrites the UFO's code points, and `--check` reports a disagreement.
|
|
124
|
+
|
|
125
|
+
Khelathi Zethu Glyphs is the temple hieroglyphs of the Khelathi, on U+1EA40 to U+1EC6F and written right to left. Its guard reads no lexicon: it shapes the sample inscriptions kept in `tools/khelathi-zethu-glyphs/samples.json`.
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
.venv/bin/python tools/khelathi-zethu-glyphs/guard.py
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
See `design/khelathi-zethu-glyphs.md`.
|