diff --git a/.gitignore b/.gitignore index 3c3629e..3da7db1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +todo.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..3fba093 --- /dev/null +++ b/readme.md @@ -0,0 +1,39 @@ + +# Zbalermorna Font Development Kit + +A collection of tools and processes for using and developing typefaces for +Zbalermorna, an alternative orthography for the constructed language Lojban. + + +### How a ZLM font works + +Zbalermorna uses special glpyhs which live in the Unicode Supplementary +Special Purpose plane, covering the region from 0xE2320 -> 0xE24FF. + +A method of inputting these glyphs requires in IME for your particular +operating system, such as `ibus` or `scim`. This project attempts to provide +configurations for as many IMEs as possible. + +Once a IME and an appropriate configuration is loaded, it can be used to type +ZLM glyphs, which a correctly constructed ZLM font will automatically display +as assembled composite glpyhs using OpenType features. + + +### Currently Supported IMEs + +- `ibus` + + +### Creating a new Zbalermorna typeface + +- Install [FontForge](http://fontforge.github.io) +- Launch the Preview page: `gulp preview` +- Clone and rename `src/zlm-manri.sfd` to create your own copy +- Open your new copy using FontForge +- Modify vector shapes for component glyphs; composite glyphs will auto-update +- Self-assembling composites can also be manually overriden with real vectors, + if your typeface wants to use special forms for certain composites. +- When your `.sfd` file is saved, Gulp will automatically recompile it into a + TrueType font, and refresh the preview page so you can see how your updates + effect ligaturing and kerning. + diff --git a/tools/zlm.feature.ls b/tools/zlm.feature.ls new file mode 100644 index 0000000..59e9328 --- /dev/null +++ b/tools/zlm.feature.ls @@ -0,0 +1,98 @@ + +# +# Setup +# + +# Render glyph names + +cons-name = (cons) -> + if cons is \Q or cons is \W + \ZLM_SEMIVOWEL_ + cons + else + \ZLM_ + cons + +vowel-name = (vowel) -> + \ZLM_DIACRITIC_ + vowel + +liga-cvv = (cons, vowel) -> + if vowel is '' + \ZLM_ + cons + else if cons is \DOT + \ZLM_DOT_ + vowel + else + \ZLM_ + cons + vowel + +liga-cvvhvv = (a, b) -> + \ZLM_CAS_ + a + \H + b + + +# Opentype feature syntax + +sub = (...comp, liga) -> + "sub " + (comp.join ' ') + " by #liga;" + +feature = (name, xx) -> + write 0 "feature #name {" + xx! + write 0 "} #name;" + blank! + + +# Output helpers + +log = console.log.bind console + +indent = (n, text) --> + (" " * n) + text + +comment = (n, text) --> + log indent n, "# #text" + +write = log . indent + +blank = -> log "" + + +# Data + +CONSN = <[ DOT H P T K F L S C M X B D G V R Z J N Q W ]> +VOWEL = <[ A E I O U Y AI EI OI AU ]> + + +# +# Generation +# + +# Generate class defs +blank! +comment 0, "Class Defs" +write 0 "@vowel = [ " + (VOWEL.map vowel-name) + " ]" +write 0 "@consonant = [ " + (CONSN.map cons-name) + " ]" +write 0 "@anything = [ @vowel @consonant ]" +blank! + +# Generate self-dotting vowels +comment 0, "Self-dotting vowels" +feature \rlig, -> + write 2 "ignore sub @anything @vowel';" + for vowel in VOWEL + write 2 sub (vowel-name vowel), (liga-cvv \DOT, vowel) + +# Generate CV series +comment 0, "CV Series" +feature \rlig, -> + for cons in CONSN + blank! + comment 2, "#cons Series" + for vowel in VOWEL + write 2 sub (cons-name cons), (vowel-name vowel), (liga-cvv cons, vowel) + +# Generate CVV'VV series +comment 0, "CVV'VV Series" +feature \rlig, -> + for vowel-a in VOWEL + blank! + comment 2, "#vowel-a Series" + for vowel-b in VOWEL + write 2, sub (vowel-name vowel-a), \ZLM_H, (vowel-name vowel-b), (liga-cvvhvv vowel-a, vowel-b) +