diff --git a/.gitignore b/.gitignore index fc2b5294..e75db0ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build/ instance_ufo/ master_ufo/ -Lilex (Autosaved).glyphs \ No newline at end of file +Lilex (Autosaved).glyphs +generator/__pycache__ diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..f622f1c3 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,4 @@ +[MASTER] +disable= + C0115, # missing-class-docstring + C0116, # missing-function-docstring \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..36a21ae7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.autoComplete.extraPaths": ["./builder"] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f50646..fb87a09d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [1.200] — Unreleased + +Added feature generator. + ## [1.100] — November 21, 2020 Added `#{` `#[` `#(` `__(` `!!` @@ -51,3 +55,5 @@ IBM Plex Mono version: 3.000 [1.000]: https://github.com/mishamyrt/Lilex/releases/tag/1.000 [1.100]: https://github.com/mishamyrt/Lilex/releases/tag/1.100 + +[1.200]: https://github.com/mishamyrt/Lilex/compare/1.100...master \ No newline at end of file diff --git a/Lilex.glyphs b/Lilex.glyphs index abc4b26e..a80f4830 100644 --- a/Lilex.glyphs +++ b/Lilex.glyphs @@ -1,7 +1,7 @@ { .appVersion = "1346"; DisplayStrings = ( -"/uni0077_w_w.liga" +"/w_w_w.liga" ); classes = ( { @@ -49,16 +49,8 @@ code = "zerosuperior onesuperior twosuperior threesuperior foursuperior fivesupe name = numbers_sups; }, { -code = "a a.alt01 b c d e f g g.alt01 g.alt02 h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z zero zero.alt01 zero.alt02 one two three four five six seven eight nine ampersand at hyphen softhyphen endash emdash underscore period ellipsis colon comma semicolon quotesingle quotedbl quoteleft quoteright quotedblleft quotedblright quotesinglbase quotedblbase guilsinglleft guilsinglright guillemotleft guillemotright exclamdown exclam questiondown question parenleft parenright bracketleft bracketright braceleft braceright slash backslash fraction percent perthousand bar brokenbar section paragraph copyright registered trademark ordfeminine ordmasculine degree asterisk dagger daggerdbl numbersign asciicircum asciitilde plus minus plusminus multiply divide equal approxequal notequal less greater lessequal greaterequal periodcentered bullet lozenge logicalnot radical integral infinity estimated litre numerosign partialdiff cent Euro florin sterling dollar yen baht coloncurrency lira naira rupee won sheqel dong kip tugrik peso guarani hryvnia cedi tenge rupeeindian liraturkish ruble bitcoin fi fl aacute abreve acircumflex adieresis adotbelow agrave ahook amacron aogonek aring aringacute atilde abreveacute abrevedotbelow abrevegrave abrevehook abrevetilde acircumflexacute acircumflexdotbelow acircumflexgrave acircumflexhook acircumflextilde aacute.alt01 abreve.alt01 acircumflex.alt01 adieresis.alt01 adotbelow.alt01 agrave.alt01 ahook.alt01 amacron.alt01 aogonek.alt01 aring.alt01 aringacute.alt01 atilde.alt01 abreveacute.alt01 abrevedotbelow.alt01 abrevegrave.alt01 abrevehook.alt01 abrevetilde.alt01 acircumflexacute.alt01 acircumflexdotbelow.alt01 acircumflexgrave.alt01 acircumflexhook.alt01 acircumflextilde.alt01 ae aeacute cacute ccaron ccedilla ccircumflex cdotaccent dcaron dcroat eth eacute ebreve ecaron ecircumflex edieresis edotaccent edotbelow egrave ehook emacron eogonek etilde ecircumflexacute ecircumflexdotbelow ecircumflexgrave ecircumflexhook ecircumflextilde schwa gbreve gcircumflex gcommaaccent gdotaccent gbreve.alt01 gcircumflex.alt01 gcommaaccent.alt01 gdotaccent.alt01 hbar hcircumflex dotlessi iacute ibreve icircumflex idieresis idotbelow igrave ihook imacron iogonek itilde ij ijacute dotlessj jacute jcircumflex kcommaaccent kgreenlandic lacute lcaron lcommaaccent ldot lslash nacute ncaron ncommaaccent ntilde napostrophe eng oacute obreve ocircumflex odieresis odotbelow ograve ohook ohungarumlaut omacron oslash oslashacute otilde ohorn ohornacute ohorndotbelow ohorngrave ohornhook ohorntilde ocircumflexacute ocircumflexdotbelow ocircumflexgrave ocircumflexhook ocircumflextilde oe racute rcaron rcommaaccent sacute scaron scedilla scircumflex scommaaccent germandbls germandbls.alt01 tbar tcaron tcommaaccent tcedilla thorn uacute ubreve ucircumflex udieresis udotbelow ugrave uhook uhungarumlaut umacron uogonek uring utilde uhorn uhornacute uhorndotbelow uhorngrave uhornhook uhorntilde wacute wcircumflex wdieresis wgrave yacute ycircumflex ydieresis ydotbelow ygrave yhook ytilde zacute zcaron zdotaccent Aacute Abreve Acircumflex Adieresis Adotbelow Agrave Ahook Amacron Aogonek Aring Aringacute Atilde Abreveacute Abrevedotbelow Abrevegrave Abrevehook Abrevetilde Acircumflexacute Acircumflexdotbelow Acircumflexgrave Acircumflexhook Acircumflextilde AE AEacute Cacute Ccaron Ccedilla Ccircumflex Cdotaccent Dcaron Dcroat Eth Eacute Ebreve Ecaron Ecircumflex Edieresis Edotaccent Edotbelow Egrave Ehook Emacron Eogonek Etilde Ecircumflexacute Ecircumflexdotbelow Ecircumflexgrave Ecircumflexhook Ecircumflextilde Schwa Gbreve Gcircumflex Gcommaaccent Gdotaccent Hbar Hcircumflex Iacute Ibreve Icircumflex Idieresis Idotaccent Idotbelow Igrave Ihook Imacron Iogonek Itilde IJ IJacute Jacute Jcircumflex Kcommaaccent Lacute Lcaron Lcommaaccent Ldot Lslash Nacute Ncaron Ncommaaccent Ntilde Eng Oacute Obreve Ocircumflex Odieresis Odotbelow Ograve Ohook Ohungarumlaut Omacron Oslash Oslashacute Otilde Ohorn Ohornacute Ohorndotbelow Ohorngrave Ohornhook Ohorntilde Ocircumflexacute Ocircumflexdotbelow Ocircumflexgrave Ocircumflexhook Ocircumflextilde OE Racute Rcaron Rcommaaccent Sacute Scaron Scedilla Scircumflex Scommaaccent Germandbls Tbar Tcaron Tcommaaccent Tcedilla Thorn Uacute Ubreve Ucircumflex Udieresis Udotbelow Ugrave Uhook Uhungarumlaut Umacron Uogonek Uring Utilde Uhorn Uhornacute Uhorndotbelow Uhorngrave Uhornhook Uhorntilde Wacute Wcircumflex Wdieresis Wgrave Yacute Ycircumflex Ydotbelow Ydieresis Ygrave Yhook Ytilde Zacute Zcaron Zdotaccent mu Delta product summation Omega pi uni0430 uni0430.alt01 uni0431 uni0432 uni0433 uni0434 uni0435 uni0436 uni0437 uni0438 uni0439 uni043A uni043B uni043C uni043D uni043E uni043F uni0440 uni0441 uni0442 uni0443 uni0444 uni0445 uni0446 uni0447 uni0448 uni0449 uni044A uni044B uni044C uni044D uni044E uni044F uni0410 uni0411 uni0412 uni0413 uni0414 uni0415 uni0416 uni0417 uni0418 uni0419 uni041A uni041B uni041C uni041D uni041E uni041F uni0420 uni0421 uni0422 uni0423 uni0424 uni0425 uni0426 uni0427 uni0428 uni0429 uni042A uni042B uni042C uni042D uni042E uni042F uni04D3 uni04D1 uni04D3.alt01 uni04D1.alt01 uni04D5 uni0453 uni0491 uni0493 uni0495 uni0450 uni0451 uni04D7 uni0454 uni04DD uni04C2 uni0497 uni04DF uni0499 uni04CF uni04E5 uni045D uni04E3 uni045C uni049B uni049D uni04A1 uni0459 uni04A3 uni045A uni04A5 uni04E7 uni0473 uni04E9 uni04AB uni04EF uni04F1 uni04F3 uni045E uni04AF uni04B1 uni04B3 uni04F5 uni04B7 uni04B9 uni04F9 uni0455 uni045F uni0456 uni0457 uni0458 uni0452 uni045B uni04BB uni04D9 uni04D2 uni04D0 uni04D4 uni0403 uni0490 uni0492 uni0494 uni0400 uni0401 uni04D6 uni0404 uni04DC uni04C1 uni0496 uni04DE uni0498 uni04C0 uni04E4 uni040D uni04E2 uni040C uni049A uni049C uni04A0 uni0409 uni04A2 uni040A uni04A4 uni04E6 uni04E8 uni04AA uni04EE uni04F0 uni04F2 uni040E uni04AE uni04B0 uni04B2 uni04F4 uni04B6 uni04B8 uni04F8 uni0405 uni040F uni0406 uni0407 uni0408 uni0402 uni040B uni04BA uni04D8 zerosuperior onesuperior twosuperior threesuperior foursuperior fivesuperior sixsuperior sevensuperior eightsuperior ninesuperior zeroinferior oneinferior twoinferior threeinferior fourinferior fiveinferior sixinferior seveninferior eightinferior nineinferior zero.numr one.numr two.numr three.numr four.numr five.numr six.numr seven.numr eight.numr nine.numr zero.dnom one.dnom two.dnom three.dnom four.dnom five.dnom six.dnom seven.dnom eight.dnom nine.dnom onehalf uni2153 uni2154 onequarter threequarters uni2155 uni2156 uni2157 uni2158 uni2159 uni215A uni2150 uni215B uni215C uni215D uni215E uni2151 checkmark crossmark arrowleft arrowup arrowdown arrowright arrowupleft arrowupright arrowdownleft arrowdownright arrowupleftcorner arrowdownleftcorner arrowleftupcorner arrowrightupcorner arrowleftdowncorner arrowrightdowncorner arrowuprightcorner arrowdownrightcorner arrowleftarrowright arrowrightarrowleft arrowleftright arrowupdown arrowdowncounterclockhalf arrowdownclockhalf arrowhookleft arrowhookright arrowupleftcounterclock arrowuprightclock tilde tilde.alt01 macron dotaccent dieresis hungarumlaut acute grave circumflex caron breve breve.cyrl ring ringacute commaturnedtop caronslovak cedilla ogonek tildecomb macroncomb dotaccentcomb dieresiscomb hungarumlautcomb acutecomb gravecomb circumflexcomb caroncomb brevecomb ringcomb hookcomb commaturnedtopcomb caronslovakcomb horncomb cedillacomb dotbelowcomb commabelowcomb ogonekcomb breveacute brevegrave brevehook brevetilde dieresisacute dieresiscaron dieresisgrave circumflexacute circumflexbreve circumflexgrave circumflexhook dieresismacron circumflextilde tilde.case tilde.alt01.case macron.case dotaccent.case dieresis.case hungarumlaut.case acute.case grave.case circumflex.case caron.case breve.case breve.cyrl_case ring.case ringacute.case hookcomb.case breveacute.case brevegrave.case brevehook.case brevetilde.case dieresisacute.case dieresiscaron.case dieresisgrave.case circumflexacute.case circumflexbreve.case circumflexgrave.case circumflexhook.case dieresismacron.case circumflextilde.case"; -name = NotSpace; -}, -{ -code = "zero one two three four five six seven eight nine"; -name = Digit; -}, -{ -code = "@Digit a b c d e f A B C D E F"; -name = HexDigit; +code = "@numbers_dflt a b c d e f A B C D E F"; +name = numbers_hex; } ); copyright = "Copyright 2019-2020 The Lilex Project Authors (https://github.com/mishamyrt/lilex/blob/master/AUTHORS)"; @@ -67,6 +59,7 @@ customParameters = ( name = Axes; value = ( { +Default = 340; Name = weight; Tag = wght; } @@ -1146,23 +1139,23 @@ code = " # slashed zero\012 sub zero by zero.alt01;"; name = zero; }, { -code = " featureNames {\012 name 3 1 0x0409 \"simple lowercase a\"; # Win / Unicode / English US\012 name 1 0 0 \"simple lowercase a\"; # Mac / Roman / English\012 };\012 # stylistic set 1 - single storey a\012 sub @lca_dflt by @lca_alt1;\012 sub @lca_cyrl_dflt by @lca_cyrl_alt1;"; +code = "# simple lowercase a\012sub @lca_dflt by @lca_alt1;\012sub @lca_cyrl_dflt by @lca_cyrl_alt1;\012"; name = ss01; }, { -code = " featureNames {\012 name 3 1 0x0409 \"simple lowercase g\"; # Win / Unicode / English US\012 name 1 0 0 \"simple lowercase g\"; # Mac / Roman / English\012 };\012 # stylistic set 2 - single storey g\012 sub @lcg_dflt by @lcg_alt1;"; +code = "# simple lowercase g\012sub @lcg_dflt by @lcg_alt1;\012"; name = ss02; }, { -code = " featureNames {\012 name 3 1 0x0409 \"slashed number zero\"; # Win / Unicode / English US\012 name 1 0 0 \"slashed number zero\"; # Mac / Roman / English\012 };\012 # slashed zero\012 sub zero by zero.alt01;"; +code = "# slashed number zero\012sub zero by zero.alt01;\012"; name = ss03; }, { -code = " featureNames {\012 name 3 1 0x0409 \"plain number zero\"; # Win / Unicode / English US\012 name 1 0 0 \"plain number zero\"; # Mac / Roman / English\012 };\012 # plain zero\012 sub zero by zero.alt02;"; +code = "# plain number zero\012sub zero by zero.alt02;\012"; name = ss04; }, { -code = " featureNames {\012 name 3 1 0x0409 \"alternate lowercase eszett\"; # Win / Unicode / English US\012 name 1 0 0 \"alternate lowercase eszett\"; # Mac / Roman / English\012 };\012 # alternative german eszett\012 sub germandbls by germandbls.alt01;"; +code = "# alternate lowercase eszett\012sub germandbls by germandbls.alt01;\012"; name = ss05; }, { @@ -1174,7 +1167,7 @@ code = " @mGC_bottom_0_0 = [cedillacomb commabelowcomb dotbelowcomb];\012 @mGC_t name = mark; }, { -code = "lookup numbersign_numbersign_numbersign_numbersign {\012 ignore sub numbersign numbersign' numbersign numbersign numbersign;\012 ignore sub numbersign' numbersign numbersign numbersign numbersign;\012 sub LIG LIG LIG numbersign' by numbersign_numbersign_numbersign_numbersign.liga;\012 sub LIG LIG numbersign' numbersign by LIG;\012 sub LIG numbersign' numbersign numbersign by LIG;\012 sub numbersign' numbersign numbersign numbersign by LIG;\012} numbersign_numbersign_numbersign_numbersign;\012\012 lookup exclam_equal_equal {\012 ignore sub exclam exclam' equal equal;\012 ignore sub exclam' equal equal equal;\012 ignore sub parenleft question exclam' equal equal;\012 ignore sub parenleft question less exclam' equal equal;\012 sub LIG LIG equal' by exclam_equal_equal.liga;\012 sub LIG equal' equal by LIG;\012 sub exclam' equal equal by LIG;\012 } exclam_equal_equal;\012\012lookup less_equal_greater {\012 ignore sub less less' equal greater;\012 ignore sub less' equal greater greater;\012 ignore sub parenleft question less' equal greater;\012 sub LIG LIG greater' by less_equal_greater.liga;\012 sub LIG equal' greater by LIG;\012 sub less' equal greater by LIG;\012} less_equal_greater;\012\012lookup less_less_equal {\012 ignore sub less less' less equal;\012 ignore sub less' less equal equal;\012 sub LIG LIG equal' by less_less_equal.liga;\012 sub LIG less' equal by LIG;\012 sub less' less equal by LIG;\012} less_less_equal;\012\012lookup slash_asciitilde_backslash {\012 ignore sub slash slash' asciitilde backslash;\012 ignore sub slash' asciitilde backslash backslash;\012 sub LIG LIG backslash' by slash_asciitilde_backslash.liga;\012 sub LIG asciitilde' backslash by LIG;\012 sub slash' asciitilde backslash by LIG;\012} slash_asciitilde_backslash;\012\012lookup underscore_underscore_parenleft {\012 ignore sub underscore underscore' underscore parenleft;\012 ignore sub underscore' underscore parenleft parenleft;\012 sub LIG LIG parenleft' by underscore_underscore_parenleft.liga;\012 sub LIG underscore' parenleft by LIG;\012 sub underscore' underscore parenleft by LIG;\012} underscore_underscore_parenleft;\012\012lookup equal_exclam_equal.liga {\012 ignore sub equal equal' exclam equal;\012 ignore sub equal' exclam equal equal;\012 ignore sub parenleft question equal' exclam equal;\012 ignore sub parenleft question less equal' exclam equal;\012 sub LIG LIG equal' by equal_exclam_equal.liga;\012 sub LIG exclam' equal by LIG;\012 sub equal' exclam equal by LIG;\012} equal_exclam_equal.liga;\012\012lookup less_slash_greater {\012 ignore sub less less' slash greater;\012 ignore sub less' slash greater greater;\012 sub LIG LIG greater' by less_slash_greater.liga;\012 sub LIG slash' greater by LIG;\012 sub less' slash greater by LIG;\012} less_slash_greater;\012\012lookup equal_colon_equal {\012 ignore sub equal equal' colon equal;\012 ignore sub equal' colon equal equal;\012 ignore sub parenleft question equal' colon equal;\012 ignore sub parenleft question less equal' colon equal;\012 sub LIG LIG equal' by equal_colon_equal.liga;\012 sub LIG colon' equal by LIG;\012 sub equal' colon equal by LIG;\012} equal_colon_equal;\012\012lookup equal_greater_greater {\012 ignore sub equal equal' greater greater;\012 ignore sub equal' greater greater greater;\012 ignore sub parenleft question equal' greater greater;\012 ignore sub parenleft question less equal' greater greater;\012 sub LIG LIG greater' by equal_greater_greater.liga;\012 sub LIG greater' greater by LIG;\012 sub equal' greater greater by LIG;\012} equal_greater_greater;\012\012 lookup period_period_period {\012 ignore sub period period' period period;\012 ignore sub period' period period period;\012 sub LIG LIG period' by period_period_period.liga;\012 sub LIG period' period by LIG;\012 sub period' period period by LIG;\012 } period_period_period;\012\012 lookup asciitilde_asciitilde_greater {\012 ignore sub asciitilde asciitilde' asciitilde greater;\012 ignore sub asciitilde' asciitilde greater greater;\012 sub LIG LIG greater' by asciitilde_asciitilde_greater.liga;\012 sub LIG asciitilde' greater by LIG;\012 sub asciitilde' asciitilde greater by LIG;\012 } asciitilde_asciitilde_greater;\012 lookup asterisk_asterisk_asterisk {\012 ignore sub asterisk asterisk' asterisk asterisk;\012 ignore sub asterisk' asterisk asterisk asterisk;\012 ignore sub slash asterisk' asterisk asterisk;\012 ignore sub asterisk' asterisk asterisk slash;\012 sub LIG LIG asterisk' by asterisk_asterisk_asterisk.liga;\012 sub LIG asterisk' asterisk by LIG;\012 sub asterisk' asterisk asterisk by LIG;\012 } asterisk_asterisk_asterisk;\012\012lookup numbersign_numbersign_numbersign {\012 ignore sub numbersign numbersign' numbersign numbersign;\012 ignore sub numbersign' numbersign numbersign numbersign;\012 sub LIG LIG numbersign' by numbersign_numbersign_numbersign.liga;\012 sub LIG numbersign' numbersign by LIG;\012 sub numbersign' numbersign numbersign by LIG;\012} numbersign_numbersign_numbersign;\012\012 lookup slash_asterisk {\012 ignore sub slash slash' asterisk;\012 ignore sub slash' asterisk asterisk;\012 ignore sub slash' asterisk slash;\012 ignore sub asterisk slash' asterisk;\012 sub LIG asterisk' by slash_asterisk.liga;\012 sub slash' asterisk by LIG;\012 } slash_asterisk;\012\012 lookup ampersand_ampersand {\012 ignore sub ampersand ampersand' ampersand;\012 ignore sub ampersand' ampersand ampersand;\012 sub LIG ampersand' by ampersand_ampersand.liga;\012 sub ampersand' ampersand by LIG;\012 } ampersand_ampersand;\012 lookup equal_equal {\012 ignore sub equal equal' equal;\012 ignore sub equal' equal equal;\012 ignore sub parenleft question equal' equal;\012 ignore sub parenleft question less equal' equal;\012 sub LIG equal' by equal_equal.liga;\012 sub equal' equal by LIG;\012 } equal_equal;\012 lookup equal_equal_equal {\012 ignore sub equal equal' equal equal;\012 ignore sub equal' equal equal equal;\012 ignore sub parenleft question equal' equal equal;\012 ignore sub parenleft question less equal' equal equal;\012 sub LIG LIG equal' by equal_equal_equal.liga;\012 sub LIG equal' equal by LIG;\012 sub equal' equal equal by LIG;\012 } equal_equal_equal;\012 lookup exclam_equal {\012 ignore sub exclam exclam' equal;\012 ignore sub exclam' equal equal;\012 ignore sub parenleft question exclam' equal;\012 ignore sub parenleft question less exclam' equal;\012 sub LIG equal' by exclam_equal.liga;\012 sub exclam' equal by LIG;\012 } exclam_equal;\012 lookup asciitilde_asciitilde {\012 ignore sub asciitilde asciitilde' asciitilde;\012 ignore sub asciitilde' asciitilde asciitilde;\012 sub LIG asciitilde' by asciitilde_asciitilde.liga;\012 sub asciitilde' asciitilde by LIG;\012 } asciitilde_asciitilde;\012 lookup bar_bar {\012 ignore sub bar bar' bar;\012 ignore sub bar' bar bar;\012 sub LIG bar' by bar_bar.liga;\012 sub bar' bar by LIG;\012 } bar_bar;\012 lookup asterisk_asterisk {\012 ignore sub asterisk asterisk' asterisk;\012 ignore sub asterisk' asterisk asterisk;\012 ignore sub slash asterisk' asterisk;\012 ignore sub asterisk' asterisk slash;\012 sub LIG asterisk' by asterisk_asterisk.liga;\012 sub asterisk' asterisk by LIG;\012 } asterisk_asterisk;\012\012 lookup slash_slash {\012 ignore sub slash slash' slash;\012 ignore sub slash' slash slash;\012 sub LIG slash' by slash_slash.liga;\012 sub slash' slash by LIG;\012 } slash_slash;\012\012lookup exclam_exclam {\012 ignore sub exclam exclam' exclam;\012 ignore sub exclam' exclam exclam;\012 ignore sub parenleft question exclam' exclam;\012 ignore sub parenleft question less exclam' exclam;\012 sub LIG exclam' by exclam_exclam.liga;\012 sub exclam' exclam by LIG;\012} exclam_exclam;\012\012 lookup equal_greater {\012 ignore sub equal equal' greater;\012 ignore sub equal' greater greater;\012 ignore sub parenleft question equal' greater;\012 ignore sub parenleft question less equal' greater;\012 sub LIG greater' by equal_greater.liga;\012 sub equal' greater by LIG;\012 } equal_greater;\012\012 lookup period_period {\012 ignore sub period period' period;\012 ignore sub period' period period;\012 sub LIG period' by period_period.liga;\012 sub period' period by LIG;\012 } period_period;\012\012 lookup colon_colon {\012 ignore sub colon colon' colon;\012 ignore sub colon' colon colon;\012 ignore sub parenleft question colon' colon;\012 sub LIG colon' by colon_colon.liga;\012 sub colon' colon by LIG;\012 } colon_colon;\012\012 lookup numbersign_exclam {\012 ignore sub numbersign numbersign' exclam;\012 ignore sub numbersign' exclam exclam;\012 sub LIG exclam' by numbersign_exclam.liga;\012 sub numbersign' exclam by LIG;\012 } numbersign_exclam;\012\012 lookup greater_equal {\012 ignore sub greater greater' equal;\012 ignore sub greater' equal equal;\012 ignore sub greater' equal less;\012 sub LIG equal' by greater_equal.liga;\012 sub greater' equal by LIG;\012 } greater_equal;\012\012 lookup less_slash {\012 ignore sub less less' slash;\012 ignore sub less' slash slash;\012 sub LIG slash' by less_slash.liga;\012 sub less' slash by LIG;\012 } less_slash;\012\012 lookup less_equal {\012 ignore sub less less' equal;\012 ignore sub less' equal equal;\012 ignore sub parenleft question less' equal;\012 sub LIG equal' by less_equal.liga;\012 sub less' equal by LIG;\012 } less_equal;\012\012 lookup asterisk_greater {\012 ignore sub asterisk asterisk' greater;\012 ignore sub asterisk' greater greater;\012 sub LIG greater' by asterisk_greater.liga;\012 sub asterisk' greater by LIG;\012 } asterisk_greater;\012\012 lookup asterisk_slash {\012 ignore sub asterisk asterisk' slash;\012 ignore sub asterisk' slash slash;\012 ignore sub slash asterisk' slash;\012 ignore sub asterisk' slash asterisk;\012 sub LIG slash' by asterisk_slash.liga;\012 sub asterisk' slash by LIG;\012 } asterisk_slash;\012\012 lookup backslash_slash {\012 ignore sub @NotSpace backslash' slash;\012 ignore sub backslash' slash @NotSpace;\012 sub LIG slash' by backslash_slash.liga;\012 sub backslash' slash by LIG;\012 } backslash_slash;\012\012 lookup period_question {\012 ignore sub period period' question;\012 ignore sub period' question question;\012 sub LIG question' by period_question.liga;\012 sub period' question by LIG;\012 } period_question;\012\012 lookup asciitilde_equal {\012 ignore sub asciitilde asciitilde' equal;\012 ignore sub asciitilde' equal equal;\012 sub LIG equal' by asciitilde_equal.liga;\012 sub asciitilde' equal by LIG;\012 } asciitilde_equal;\012\012 lookup hyphen_hyphen {\012 ignore sub hyphen hyphen' hyphen;\012 ignore sub hyphen' hyphen hyphen;\012 sub LIG hyphen' by hyphen_hyphen.liga;\012 sub hyphen' hyphen by LIG;\012 } hyphen_hyphen;\012\012 lookup plus_plus {\012 ignore sub plus plus' plus;\012 ignore sub plus' plus plus;\012 sub LIG plus' by plus_plus.liga;\012 sub plus' plus by LIG;\012 } plus_plus;\012\012 lookup slash_greater {\012 ignore sub slash slash' greater;\012 ignore sub slash' greater greater;\012 sub LIG greater' by slash_greater.liga;\012 sub slash' greater by LIG;\012 } slash_greater;\012\012 lookup w_w_w {\012 ignore sub w w' w w;\012 ignore sub w' w w w;\012 sub LIG LIG w' by uni0077_w_w.liga;\012 sub LIG w' w by LIG;\012 sub w' w w by LIG;\012 } w_w_w;\012\012 lookup underscore_underscore {\012 ignore sub underscore underscore' underscore;\012 ignore sub underscore' underscore underscore;\012 sub LIG underscore' by underscore_underscore.liga;\012 sub underscore' underscore by LIG;\012 } underscore_underscore;\012\012 lookup slash_equal {\012 ignore sub slash slash' equal;\012 ignore sub slash' equal equal;\012 sub LIG equal' by slash_equal.liga;\012 sub slash' equal by LIG;\012 } slash_equal;\012\012 lookup period_equal {\012 ignore sub period period' equal;\012 ignore sub period' equal equal;\012 sub LIG equal' by period_equal.liga;\012 sub period' equal by LIG;\012 } period_equal;\012\012lookup colon_equal {\012 ignore sub colon colon' equal;\012 ignore sub colon' equal equal;\012 ignore sub parenleft question colon' equal;\012 sub LIG equal' by colon_equal.liga;\012 sub colon' equal by LIG;\012} colon_equal;\012\012lookup hyphen_greater {\012 ignore sub hyphen hyphen' greater;\012 ignore sub hyphen' greater greater;\012 sub LIG greater' by hyphen_greater.liga;\012 sub hyphen' greater by LIG;\012} hyphen_greater;\012\012lookup less_hyphen {\012 ignore sub less less' hyphen;\012 ignore sub less' hyphen hyphen;\012 sub LIG hyphen' by less_hyphen.liga;\012 sub less' hyphen by LIG;\012} less_hyphen;\012\012lookup numbersign_numbersign {\012 ignore sub numbersign numbersign' numbersign;\012 ignore sub numbersign' numbersign numbersign;\012 sub LIG numbersign' by numbersign_numbersign.liga;\012 sub numbersign' numbersign by LIG;\012} numbersign_numbersign;\012\012lookup numbersign_braceleft {\012 ignore sub numbersign numbersign' braceleft;\012 ignore sub numbersign' braceleft braceleft;\012 sub LIG braceleft' by numbersign_braceleft.liga;\012 sub numbersign' braceleft by LIG;\012} numbersign_braceleft;\012\012lookup numbersign_bracketleft {\012 ignore sub numbersign numbersign' bracketleft;\012 ignore sub numbersign' bracketleft bracketleft;\012 sub LIG bracketleft' by numbersign_bracketleft.liga;\012 sub numbersign' bracketleft by LIG;\012} numbersign_bracketleft;\012\012lookup numbersign_parenleft {\012 ignore sub numbersign numbersign' parenleft;\012 ignore sub numbersign' parenleft parenleft;\012 sub LIG parenleft' by numbersign_parenleft.liga;\012 sub numbersign' parenleft by LIG;\012} numbersign_parenleft;\012\012lookup greater_greater {\012 ignore sub greater greater' greater;\012 ignore sub greater' greater greater;\012 ignore sub asterisk greater' greater;\012 ignore sub plus greater' greater;\012 ignore sub dollar greater' greater;\012 sub LIG greater' by greater_greater.liga;\012 sub greater' greater by LIG;\012} greater_greater;\012\012\012\012 sub zero x' @HexDigit by multiply;\012 sub @Digit x' @Digit by multiply;\012 sub @Digit colon' @Digit by colon.valign;"; +code = "lookup ampersand_ampersand { \012 ignore sub ampersand ampersand' ampersand;\012 ignore sub ampersand' ampersand ampersand; sub LIG ampersand' by ampersand_ampersand.liga;\012 sub ampersand' ampersand by LIG;\012} ampersand_ampersand;\012lookup equal_equal { \012 ignore sub equal equal' equal;\012 ignore sub equal' equal equal;\012 ignore sub less question equal' equal;\012 ignore sub parenleft question less equal' equal; sub LIG equal' by equal_equal.liga;\012 sub equal' equal by LIG;\012} equal_equal;\012lookup equal_equal_equal { \012 ignore sub equal equal' equal equal;\012 ignore sub equal' equal equal equal;\012 ignore sub less question equal' equal equal;\012 ignore sub parenleft question less equal' equal equal; sub LIG LIG equal' by equal_equal_equal.liga;\012 sub LIG equal' equal by LIG;\012 sub equal' equal equal by LIG;\012} equal_equal_equal;\012lookup exclam_equal { \012 ignore sub exclam exclam' equal;\012 ignore sub exclam' equal equal; sub LIG equal' by exclam_equal.liga;\012 sub exclam' equal by LIG;\012} exclam_equal;\012lookup exclam_equal_equal { \012 ignore sub exclam exclam' equal equal;\012 ignore sub exclam' equal equal equal; sub LIG LIG equal' by exclam_equal_equal.liga;\012 sub LIG equal' equal by LIG;\012 sub exclam' equal equal by LIG;\012} exclam_equal_equal;\012lookup asciitilde_asciitilde { \012 ignore sub asciitilde asciitilde' asciitilde;\012 ignore sub asciitilde' asciitilde asciitilde; sub LIG asciitilde' by asciitilde_asciitilde.liga;\012 sub asciitilde' asciitilde by LIG;\012} asciitilde_asciitilde;\012lookup bar_bar { \012 ignore sub bar bar' bar;\012 ignore sub bar' bar bar; sub LIG bar' by bar_bar.liga;\012 sub bar' bar by LIG;\012} bar_bar;\012lookup asterisk_asterisk { \012 ignore sub asterisk asterisk' asterisk;\012 ignore sub asterisk' asterisk asterisk; sub LIG asterisk' by asterisk_asterisk.liga;\012 sub asterisk' asterisk by LIG;\012} asterisk_asterisk;\012lookup asterisk_asterisk_asterisk { \012 ignore sub asterisk asterisk' asterisk asterisk;\012 ignore sub asterisk' asterisk asterisk asterisk; sub LIG LIG asterisk' by asterisk_asterisk_asterisk.liga;\012 sub LIG asterisk' asterisk by LIG;\012 sub asterisk' asterisk asterisk by LIG;\012} asterisk_asterisk_asterisk;\012lookup slash_slash { \012 ignore sub slash slash' slash;\012 ignore sub slash' slash slash; sub LIG slash' by slash_slash.liga;\012 sub slash' slash by LIG;\012} slash_slash;\012lookup equal_greater { \012 ignore sub equal equal' greater;\012 ignore sub equal' greater greater;\012 ignore sub less question equal' equal;\012 ignore sub parenleft question less equal' equal; sub LIG greater' by equal_greater.liga;\012 sub equal' greater by LIG;\012} equal_greater;\012lookup asciitilde_asciitilde_greater { \012 ignore sub asciitilde asciitilde' asciitilde greater;\012 ignore sub asciitilde' asciitilde greater greater; sub LIG LIG greater' by asciitilde_asciitilde_greater.liga;\012 sub LIG asciitilde' greater by LIG;\012 sub asciitilde' asciitilde greater by LIG;\012} asciitilde_asciitilde_greater;\012lookup greater_equal { \012 ignore sub greater greater' equal;\012 ignore sub greater' equal equal; sub LIG equal' by greater_equal.liga;\012 sub greater' equal by LIG;\012} greater_equal;\012lookup less_equal { \012 ignore sub less less' equal;\012 ignore sub less' equal equal; sub LIG equal' by less_equal.liga;\012 sub less' equal by LIG;\012} less_equal;\012lookup asterisk_greater { \012 ignore sub asterisk asterisk' greater;\012 ignore sub asterisk' greater greater; sub LIG greater' by asterisk_greater.liga;\012 sub asterisk' greater by LIG;\012} asterisk_greater;\012lookup asterisk_slash { \012 ignore sub asterisk asterisk' slash;\012 ignore sub asterisk' slash slash; sub LIG slash' by asterisk_slash.liga;\012 sub asterisk' slash by LIG;\012} asterisk_slash;\012lookup slash_asterisk { \012 ignore sub slash slash' asterisk;\012 ignore sub slash' asterisk asterisk; sub LIG asterisk' by slash_asterisk.liga;\012 sub slash' asterisk by LIG;\012} slash_asterisk;\012lookup backslash_slash { \012 ignore sub backslash backslash' slash;\012 ignore sub backslash' slash slash; sub LIG slash' by backslash_slash.liga;\012 sub backslash' slash by LIG;\012} backslash_slash;\012lookup period_question { \012 ignore sub period period' question;\012 ignore sub period' question question; sub LIG question' by period_question.liga;\012 sub period' question by LIG;\012} period_question;\012lookup asciitilde_equal { \012 ignore sub asciitilde asciitilde' equal;\012 ignore sub asciitilde' equal equal; sub LIG equal' by asciitilde_equal.liga;\012 sub asciitilde' equal by LIG;\012} asciitilde_equal;\012lookup hyphen_hyphen { \012 ignore sub hyphen hyphen' hyphen;\012 ignore sub hyphen' hyphen hyphen; sub LIG hyphen' by hyphen_hyphen.liga;\012 sub hyphen' hyphen by LIG;\012} hyphen_hyphen;\012lookup plus_plus { \012 ignore sub plus plus' plus;\012 ignore sub plus' plus plus; sub LIG plus' by plus_plus.liga;\012 sub plus' plus by LIG;\012} plus_plus;\012lookup period_period_period { \012 ignore sub period period' period period;\012 ignore sub period' period period period; sub LIG LIG period' by period_period_period.liga;\012 sub LIG period' period by LIG;\012 sub period' period period by LIG;\012} period_period_period;\012lookup period_period { \012 ignore sub period period' period;\012 ignore sub period' period period; sub LIG period' by period_period.liga;\012 sub period' period by LIG;\012} period_period;\012lookup colon_colon { \012 ignore sub colon colon' colon;\012 ignore sub colon' colon colon;\012 ignore sub parenleft question colon' colon; sub LIG colon' by colon_colon.liga;\012 sub colon' colon by LIG;\012} colon_colon;\012lookup numbersign_exclam { \012 ignore sub numbersign numbersign' exclam;\012 ignore sub numbersign' exclam exclam; sub LIG exclam' by numbersign_exclam.liga;\012 sub numbersign' exclam by LIG;\012} numbersign_exclam;\012lookup less_slash { \012 ignore sub less less' slash;\012 ignore sub less' slash slash; sub LIG slash' by less_slash.liga;\012 sub less' slash by LIG;\012} less_slash;\012lookup slash_greater { \012 ignore sub slash slash' greater;\012 ignore sub slash' greater greater; sub LIG greater' by slash_greater.liga;\012 sub slash' greater by LIG;\012} slash_greater;\012lookup underscore_underscore { \012 ignore sub underscore underscore' underscore;\012 ignore sub underscore' underscore underscore; sub LIG underscore' by underscore_underscore.liga;\012 sub underscore' underscore by LIG;\012} underscore_underscore;\012lookup slash_equal { \012 ignore sub slash slash' equal;\012 ignore sub slash' equal equal; sub LIG equal' by slash_equal.liga;\012 sub slash' equal by LIG;\012} slash_equal;\012lookup period_equal { \012 ignore sub period period' equal;\012 ignore sub period' equal equal; sub LIG equal' by period_equal.liga;\012 sub period' equal by LIG;\012} period_equal;\012lookup colon_equal { \012 ignore sub colon colon' equal;\012 ignore sub colon' equal equal;\012 ignore sub parenleft question colon' colon; sub LIG equal' by colon_equal.liga;\012 sub colon' equal by LIG;\012} colon_equal;\012lookup hyphen_greater { \012 ignore sub hyphen hyphen' greater;\012 ignore sub hyphen' greater greater; sub LIG greater' by hyphen_greater.liga;\012 sub hyphen' greater by LIG;\012} hyphen_greater;\012lookup less_hyphen { \012 ignore sub less less' hyphen;\012 ignore sub less' hyphen hyphen; sub LIG hyphen' by less_hyphen.liga;\012 sub less' hyphen by LIG;\012} less_hyphen;\012lookup less_slash_greater { \012 ignore sub less less' slash greater;\012 ignore sub less' slash greater greater; sub LIG LIG greater' by less_slash_greater.liga;\012 sub LIG slash' greater by LIG;\012 sub less' slash greater by LIG;\012} less_slash_greater;\012lookup numbersign_numbersign { \012 ignore sub numbersign numbersign' numbersign;\012 ignore sub numbersign' numbersign numbersign; sub LIG numbersign' by numbersign_numbersign.liga;\012 sub numbersign' numbersign by LIG;\012} numbersign_numbersign;\012lookup numbersign_numbersign_numbersign { \012 ignore sub numbersign numbersign' numbersign numbersign;\012 ignore sub numbersign' numbersign numbersign numbersign; sub LIG LIG numbersign' by numbersign_numbersign_numbersign.liga;\012 sub LIG numbersign' numbersign by LIG;\012 sub numbersign' numbersign numbersign by LIG;\012} numbersign_numbersign_numbersign;\012lookup numbersign_numbersign_numbersign_numbersign { \012 ignore sub numbersign numbersign' numbersign numbersign numbersign;\012 ignore sub numbersign' numbersign numbersign numbersign numbersign; sub LIG LIG LIG numbersign' by numbersign_numbersign_numbersign_numbersign.liga;\012 sub LIG LIG numbersign' numbersign by LIG;\012 sub LIG numbersign' numbersign numbersign by LIG;\012 sub numbersign' numbersign numbersign numbersign by LIG;\012} numbersign_numbersign_numbersign_numbersign;\012lookup less_equal_greater { \012 ignore sub less less' equal greater;\012 ignore sub less' equal greater greater; sub LIG LIG greater' by less_equal_greater.liga;\012 sub LIG equal' greater by LIG;\012 sub less' equal greater by LIG;\012} less_equal_greater;\012lookup greater_greater { \012 ignore sub greater greater' greater;\012 ignore sub greater' greater greater; sub LIG greater' by greater_greater.liga;\012 sub greater' greater by LIG;\012} greater_greater;\012lookup equal_greater_greater { \012 ignore sub equal equal' greater greater;\012 ignore sub equal' greater greater greater;\012 ignore sub less question equal' equal greater;\012 ignore sub parenleft question less equal' equal greater; sub LIG LIG greater' by equal_greater_greater.liga;\012 sub LIG greater' greater by LIG;\012 sub equal' greater greater by LIG;\012} equal_greater_greater;\012lookup equal_colon_equal { \012 ignore sub equal equal' colon equal;\012 ignore sub equal' colon equal equal;\012 ignore sub less question equal' equal colon;\012 ignore sub parenleft question less equal' equal colon; sub LIG LIG equal' by equal_colon_equal.liga;\012 sub LIG colon' equal by LIG;\012 sub equal' colon equal by LIG;\012} equal_colon_equal;\012lookup equal_exclam_equal { \012 ignore sub equal equal' exclam equal;\012 ignore sub equal' exclam equal equal;\012 ignore sub less question equal' equal exclam;\012 ignore sub parenleft question less equal' equal exclam; sub LIG LIG equal' by equal_exclam_equal.liga;\012 sub LIG exclam' equal by LIG;\012 sub equal' exclam equal by LIG;\012} equal_exclam_equal;\012lookup less_less_equal { \012 ignore sub less less' less equal;\012 ignore sub less' less equal equal; sub LIG LIG equal' by less_less_equal.liga;\012 sub LIG less' equal by LIG;\012 sub less' less equal by LIG;\012} less_less_equal;\012lookup slash_asciitilde_backslash { \012 ignore sub slash slash' asciitilde backslash;\012 ignore sub slash' asciitilde backslash backslash; sub LIG LIG backslash' by slash_asciitilde_backslash.liga;\012 sub LIG asciitilde' backslash by LIG;\012 sub slash' asciitilde backslash by LIG;\012} slash_asciitilde_backslash;\012lookup numbersign_braceleft { \012 ignore sub numbersign numbersign' braceleft;\012 ignore sub numbersign' braceleft braceleft; sub LIG braceleft' by numbersign_braceleft.liga;\012 sub numbersign' braceleft by LIG;\012} numbersign_braceleft;\012lookup numbersign_bracketleft { \012 ignore sub numbersign numbersign' bracketleft;\012 ignore sub numbersign' bracketleft bracketleft; sub LIG bracketleft' by numbersign_bracketleft.liga;\012 sub numbersign' bracketleft by LIG;\012} numbersign_bracketleft;\012lookup numbersign_parenleft { \012 ignore sub numbersign numbersign' parenleft;\012 ignore sub numbersign' parenleft parenleft; sub LIG parenleft' by numbersign_parenleft.liga;\012 sub numbersign' parenleft by LIG;\012} numbersign_parenleft;\012lookup underscore_underscore_parenleft { \012 ignore sub underscore underscore' underscore parenleft;\012 ignore sub underscore' underscore parenleft parenleft; sub LIG LIG parenleft' by underscore_underscore_parenleft.liga;\012 sub LIG underscore' parenleft by LIG;\012 sub underscore' underscore parenleft by LIG;\012} underscore_underscore_parenleft;\012lookup exclam_exclam { \012 ignore sub exclam exclam' exclam;\012 ignore sub exclam' exclam exclam; sub LIG exclam' by exclam_exclam.liga;\012 sub exclam' exclam by LIG;\012} exclam_exclam;\012lookup w_w_w { \012 ignore sub w w' w w;\012 ignore sub w' w w w; sub LIG LIG w' by w_w_w.liga;\012 sub LIG w' w by LIG;\012 sub w' w w by LIG;\012} w_w_w;\012\012# Digit color align\012# Example: 10:20\012sub @numbers_dflt colon' @numbers_dflt by colon.valign;\012\012# Multiply align\012# Examples: 0xDEADBEEF, 10x2\012sub zero x' @numbers_hex by multiply;\012sub @numbers_dflt x' @numbers_dflt by multiply;\012\012"; name = calt; } ); @@ -19172,7 +19165,7 @@ unicode = 00E4; }, { glyphname = adotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -19606,7 +19599,7 @@ unicode = 1EAF; }, { glyphname = abrevedotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -19795,7 +19788,7 @@ unicode = 1EA5; }, { glyphname = acircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -20075,7 +20068,7 @@ width = 1200; }, { glyphname = adotbelow.alt01; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -20480,7 +20473,7 @@ width = 1200; }, { glyphname = abrevedotbelow.alt01; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -20664,7 +20657,7 @@ width = 1200; }, { glyphname = acircumflexdotbelow.alt01; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -21904,7 +21897,7 @@ unicode = 0117; }, { glyphname = edotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -22254,7 +22247,7 @@ unicode = 1EBF; }, { glyphname = ecircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -23145,7 +23138,7 @@ unicode = 00EF; }, { glyphname = idotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -23826,7 +23819,7 @@ unicode = 0135; }, { glyphname = kcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -23983,7 +23976,7 @@ unicode = 013E; }, { glyphname = lcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -24186,7 +24179,7 @@ unicode = 0148; }, { glyphname = ncommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -24548,7 +24541,7 @@ unicode = 00F6; }, { glyphname = odotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -25140,7 +25133,7 @@ unicode = 1EDB; }, { glyphname = ohorndotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -25308,7 +25301,7 @@ unicode = 1ED1; }, { glyphname = ocircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -25692,7 +25685,7 @@ unicode = 0159; }, { glyphname = rcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -25986,7 +25979,7 @@ unicode = 015D; }, { glyphname = scommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -26373,7 +26366,7 @@ unicode = 0165; }, { glyphname = tcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -26406,7 +26399,7 @@ unicode = 0163; }, { glyphname = tcedilla; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -26677,7 +26670,7 @@ unicode = 00FC; }, { glyphname = udotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -27201,7 +27194,7 @@ unicode = 1EE9; }, { glyphname = uhorndotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -27553,7 +27546,7 @@ unicode = 00FF; }, { glyphname = ydotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -27900,7 +27893,7 @@ unicode = 00C4; }, { glyphname = Adotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -28266,7 +28259,7 @@ unicode = 1EAE; }, { glyphname = Abrevedotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -28453,7 +28446,7 @@ unicode = 1EA4; }, { glyphname = Acircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -29362,7 +29355,7 @@ unicode = 0116; }, { glyphname = Edotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -29662,7 +29655,7 @@ unicode = 1EBE; }, { glyphname = Ecircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -29982,7 +29975,7 @@ unicode = 011C; }, { glyphname = Gcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -30322,7 +30315,7 @@ unicode = 0130; }, { glyphname = Idotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -30765,7 +30758,7 @@ unicode = 0134; }, { glyphname = Kcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -30864,7 +30857,7 @@ unicode = 013D; }, { glyphname = Lcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -31054,7 +31047,7 @@ unicode = 0147; }, { glyphname = Ncommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -31310,7 +31303,7 @@ unicode = 00D6; }, { glyphname = Odotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -31912,7 +31905,7 @@ unicode = 1EDA; }, { glyphname = Ohorndotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -32081,7 +32074,7 @@ unicode = 1ED0; }, { glyphname = Ocircumflexdotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -32391,7 +32384,7 @@ unicode = 0158; }, { glyphname = Rcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -32685,7 +32678,7 @@ unicode = 015C; }, { glyphname = Scommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -32903,7 +32896,7 @@ unicode = 0164; }, { glyphname = Tcommaaccent; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -32936,7 +32929,7 @@ unicode = 0162; }, { glyphname = Tcedilla; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -33179,7 +33172,7 @@ unicode = 00DC; }, { glyphname = Udotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -33685,7 +33678,7 @@ unicode = 1EE8; }, { glyphname = Uhorndotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -34003,7 +33996,7 @@ unicode = 0176; }, { glyphname = Ydotbelow; -lastChange = "2020-11-21 14:55:02 +0000"; +lastChange = "2020-11-23 22:50:32 +0000"; layers = ( { components = ( @@ -60158,144 +60151,6 @@ width = 1200; ); }, { -color = (153,171,255,255); -glyphname = uni0077_w_w.liga; -lastChange = "2020-09-29 22:00:15 +0000"; -layers = ( -{ -guideLines = ( -{ -position = "{-615, 0}"; -} -); -layerId = master01; -paths = ( -{ -closed = 1; -nodes = ( -"-1854 0 LINE", -"-1750 712 LINE", -"-1729 712 LINE", -"-1624 0 LINE", -"-1263 0 LINE", -"-1184 712 LINE", -"-1164 712 LINE", -"-1086 0 LINE {name = hr00.2;}", -"-724 0 LINE", -"-619 712 LINE", -"-599 712 LINE", -"-494 0 LINE", -"-132 0 LINE", -"-52 712 LINE", -"-32 712 LINE", -"48 0 LINE {name = hr00.1;}", -"409 0 LINE", -"514 712 LINE", -"535 712 LINE", -"639 0 LINE", -"1001 0 LINE", -"1126 1032 LINE", -"886 1032 LINE", -"808 196 LINE", -"787 196 LINE", -"664 905 LINE", -"397 905 LINE", -"272 196 LINE", -"251 196 LINE", -"92 905 LINE", -"-175 905 LINE", -"-325 196 LINE", -"-346 196 LINE", -"-469 905 LINE", -"-736 905 LINE", -"-862 196 LINE", -"-882 196 LINE", -"-1041 905 LINE", -"-1308 905 LINE", -"-1456 196 LINE", -"-1476 196 LINE", -"-1600 905 LINE", -"-1867 905 LINE", -"-1992 196 LINE", -"-2013 196 LINE", -"-2089 1032 LINE", -"-2341 1032 LINE", -"-2216 0 LINE {name = hr00.3;}" -); -} -); -width = 1195; -}, -{ -guideLines = ( -{ -position = "{-600, 0}"; -}, -{ -position = "{-610, 0}"; -} -); -layerId = master02; -paths = ( -{ -closed = 1; -nodes = ( -"-1717 737 LINE", -"-1700 737 LINE", -"-1524 0 LINE", -"-1299 0 LINE", -"-1164 737 LINE", -"-1148 737 LINE", -"-1013 0 LINE", -"-789 0 LINE", -"-608 737 LINE", -"-591 737 LINE", -"-414 0 LINE", -"-190 0 LINE", -"-55 737 LINE", -"-37 737 LINE", -"98 0 LINE", -"322 0 LINE", -"503 737 LINE", -"520 737 LINE", -"697 0 LINE", -"920 0 LINE", -"1091 1032 LINE", -"943 1032 LINE", -"815 140 LINE", -"796 140 LINE", -"607 905 LINE", -"417 905 LINE", -"228 140 LINE", -"208 140 LINE", -"50 905 LINE", -"-140 905 LINE", -"-296 140 LINE", -"-315 140 LINE", -"-504 905 LINE", -"-694 905 LINE", -"-883 140 LINE", -"-903 140 LINE", -"-1062 905 LINE", -"-1252 905 LINE", -"-1405 140 LINE", -"-1424 140 LINE", -"-1614 905 LINE", -"-1803 905 LINE", -"-1993 140 LINE", -"-2012 140 LINE", -"-2139 1032 LINE", -"-2292 1032 LINE", -"-2122 0 LINE", -"-1898 0 LINE" -); -} -); -width = 1200; -} -); -}, -{ color = (153,169,255,255); glyphname = underscore_underscore.liga; layers = ( @@ -62697,6 +62552,144 @@ vertWidth = 1560; width = 1200; } ); +}, +{ +color = (153,171,255,255); +glyphname = w_w_w.liga; +lastChange = "2020-11-24 11:33:48 +0000"; +layers = ( +{ +guideLines = ( +{ +position = "{-615, 0}"; +} +); +layerId = master01; +paths = ( +{ +closed = 1; +nodes = ( +"-1854 0 LINE", +"-1750 712 LINE", +"-1729 712 LINE", +"-1624 0 LINE", +"-1263 0 LINE", +"-1184 712 LINE", +"-1164 712 LINE", +"-1086 0 LINE {name = hr00.2;}", +"-724 0 LINE", +"-619 712 LINE", +"-599 712 LINE", +"-494 0 LINE", +"-132 0 LINE", +"-52 712 LINE", +"-32 712 LINE", +"48 0 LINE {name = hr00.1;}", +"409 0 LINE", +"514 712 LINE", +"535 712 LINE", +"639 0 LINE", +"1001 0 LINE", +"1126 1032 LINE", +"886 1032 LINE", +"808 196 LINE", +"787 196 LINE", +"664 905 LINE", +"397 905 LINE", +"272 196 LINE", +"251 196 LINE", +"92 905 LINE", +"-175 905 LINE", +"-325 196 LINE", +"-346 196 LINE", +"-469 905 LINE", +"-736 905 LINE", +"-862 196 LINE", +"-882 196 LINE", +"-1041 905 LINE", +"-1308 905 LINE", +"-1456 196 LINE", +"-1476 196 LINE", +"-1600 905 LINE", +"-1867 905 LINE", +"-1992 196 LINE", +"-2013 196 LINE", +"-2089 1032 LINE", +"-2341 1032 LINE", +"-2216 0 LINE {name = hr00.3;}" +); +} +); +width = 1195; +}, +{ +guideLines = ( +{ +position = "{-600, 0}"; +}, +{ +position = "{-610, 0}"; +} +); +layerId = master02; +paths = ( +{ +closed = 1; +nodes = ( +"-1717 737 LINE", +"-1700 737 LINE", +"-1524 0 LINE", +"-1299 0 LINE", +"-1164 737 LINE", +"-1148 737 LINE", +"-1013 0 LINE", +"-789 0 LINE", +"-608 737 LINE", +"-591 737 LINE", +"-414 0 LINE", +"-190 0 LINE", +"-55 737 LINE", +"-37 737 LINE", +"98 0 LINE", +"322 0 LINE", +"503 737 LINE", +"520 737 LINE", +"697 0 LINE", +"920 0 LINE", +"1091 1032 LINE", +"943 1032 LINE", +"815 140 LINE", +"796 140 LINE", +"607 905 LINE", +"417 905 LINE", +"228 140 LINE", +"208 140 LINE", +"50 905 LINE", +"-140 905 LINE", +"-296 140 LINE", +"-315 140 LINE", +"-504 905 LINE", +"-694 905 LINE", +"-883 140 LINE", +"-903 140 LINE", +"-1062 905 LINE", +"-1252 905 LINE", +"-1405 140 LINE", +"-1424 140 LINE", +"-1614 905 LINE", +"-1803 905 LINE", +"-1993 140 LINE", +"-2012 140 LINE", +"-2139 1032 LINE", +"-2292 1032 LINE", +"-2122 0 LINE", +"-1898 0 LINE" +); +} +); +width = 1200; +} +); } ); instances = ( @@ -62705,6 +62698,13 @@ interpolationWeight = 400; instanceInterpolations = { master02 = 1; }; +name = Light; +}, +{ +interpolationWeight = 400; +instanceInterpolations = { +master02 = 1; +}; name = Regular; }, { @@ -62714,7 +62714,6 @@ master01 = 0.44444; master02 = 0.55556; }; name = Medium; -weightClass = Medium; }, { interpolationWeight = 700; @@ -62722,7 +62721,6 @@ instanceInterpolations = { master01 = 1; }; name = Bold; -weightClass = Bold; } ); manufacturer = "Mikhael Khrustik"; diff --git a/Makefile b/Makefile index e6b96401..93f7f029 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.PHONY: regenerate + BUILD_DIRECTORY := "build" GLYPHS_FILE := "Lilex.glyphs" VF_FILE := "$(BUILD_DIRECTORY)/variable_ttf/Lilex-VF.ttf" @@ -8,6 +10,9 @@ else OS := "$(shell lsb_release -si)" endif +regenerate: + python3 generator/main.py + all: ttf otf variable_ttf ttf: raw_ttf diff --git a/classes/numbers_hex.fea b/classes/numbers_hex.fea new file mode 100644 index 00000000..b4607fcb --- /dev/null +++ b/classes/numbers_hex.fea @@ -0,0 +1 @@ +@numbers_dflt a b c d e f A B C D E F \ No newline at end of file diff --git a/features/calt/colon.fea b/features/calt/colon.fea new file mode 100644 index 00000000..2775e37c --- /dev/null +++ b/features/calt/colon.fea @@ -0,0 +1,3 @@ +# Digit color align +# Example: 10:20 +sub @numbers_dflt colon' @numbers_dflt by colon.valign; diff --git a/features/calt/multiply.fea b/features/calt/multiply.fea new file mode 100644 index 00000000..bbff57f2 --- /dev/null +++ b/features/calt/multiply.fea @@ -0,0 +1,4 @@ +# Multiply align +# Examples: 0xDEADBEEF, 10x2 +sub zero x' @numbers_hex by multiply; +sub @numbers_dflt x' @numbers_dflt by multiply; diff --git a/features/ss01.fea b/features/ss01.fea new file mode 100644 index 00000000..18d8d818 --- /dev/null +++ b/features/ss01.fea @@ -0,0 +1,3 @@ +# simple lowercase a +sub @lca_dflt by @lca_alt1; +sub @lca_cyrl_dflt by @lca_cyrl_alt1; diff --git a/features/ss02.fea b/features/ss02.fea new file mode 100644 index 00000000..fbc5b977 --- /dev/null +++ b/features/ss02.fea @@ -0,0 +1,2 @@ +# simple lowercase g +sub @lcg_dflt by @lcg_alt1; diff --git a/features/ss03.fea b/features/ss03.fea new file mode 100644 index 00000000..e04cf0ca --- /dev/null +++ b/features/ss03.fea @@ -0,0 +1,2 @@ +# slashed number zero +sub zero by zero.alt01; diff --git a/features/ss04.fea b/features/ss04.fea new file mode 100644 index 00000000..33608b20 --- /dev/null +++ b/features/ss04.fea @@ -0,0 +1,2 @@ +# plain number zero +sub zero by zero.alt02; diff --git a/features/ss05.fea b/features/ss05.fea new file mode 100644 index 00000000..70bf4a4e --- /dev/null +++ b/features/ss05.fea @@ -0,0 +1,2 @@ +# alternate lowercase eszett +sub germandbls by germandbls.alt01; diff --git a/generator/classes.py b/generator/classes.py new file mode 100644 index 00000000..c803d4ee --- /dev/null +++ b/generator/classes.py @@ -0,0 +1,21 @@ + +''' +Class helpers +''' + +from typing import List + +denied_symbols = [ + '.notdef', + 'NULL', + 'CR' +] + +def is_space (symbol: str) -> bool: + return \ + '.liga' in symbol or \ + symbol in denied_symbols or \ + 'space' in symbol + +def get_not_space_glyphs (symbols: List[str]) -> List[str]: + return list(filter(lambda x: not is_space(x), symbols)) diff --git a/generator/fea.py b/generator/fea.py new file mode 100644 index 00000000..2af99b06 --- /dev/null +++ b/generator/fea.py @@ -0,0 +1,13 @@ +''' +fea files helpers +''' + +def read_file (path: str) -> str: + with open(path) as file: + return file.read() + +def read_feature (name: str) -> str: + return read_file(f'./features/{name}.fea') + +def read_class (name: str) -> str: + return read_file(f'./classes/{name}.fea') diff --git a/generator/glyphs.py b/generator/glyphs.py new file mode 100644 index 00000000..9c141035 --- /dev/null +++ b/generator/glyphs.py @@ -0,0 +1,91 @@ +""" +Glyphs.app format processor +""" + +import re +from typing import Union, List, Dict, Tuple + +convert_nl = lambda x: x.replace('\n', "\\012") + +# Determine minimum indentation (first line doesn't count): +class GlyphsFile: + glyphs: List[str] = [] + __raw: str = '' + __path: str + __features: Dict[str, str] + __classes: Dict[str, str] + + def __init__ (self, path: str): + with open(path) as file: + for line in file: + self.__raw += f'{line}' + name = self.__find_glyph_name(line) + if name is not None: + self.glyphs.append(name) + self.__path = path + self.__features = self.__read_list('features') + self.__classes = self.__read_list('classes') + + def flush (self): + file = open(self.__path, 'w') + file.write(self.__raw) + + def set_feature (self, name, value): + self.__features[name] = f'"{convert_nl(value)}"' + self.__write_list('features', self.__features) + + def set_class (self, name, value): + self.__classes[name] = f'"{convert_nl(value)}"' + self.__write_list('classes', self.__classes) + + @property + def ligatures(self): + return list( + map(lambda x: x.replace('.liga', ''), + filter(lambda x: x.endswith('.liga'), self.glyphs))) + + def __find_glyph_name(self, line: str) -> Union[str, None]: + result = re.match(r'glyphname = (.*);', line) + if result is None: + return None + return result.group(1) + + def __read_fields (self, field: str, text_slice: str) -> List[str]: + pattern = re.compile(rf'{field} = (.*)', re.M) + values: List[str] = [] + for value_match in pattern.finditer(text_slice): + values.append(value_match.group(1)[:-1]) + return values + + def __find_definition_index (self, field: str, prefix = '') -> Tuple: + start_index = self.__raw.index(f"{field} = {prefix}") + end_index = self.__raw.index(');', start_index) + return (start_index, end_index + 2) + + def __write_list (self, field: str, value: Dict[str, str]): + start, end = self.__find_definition_index(field) + list_str = '' + for name, code in value.items(): + list_str += ( + '{\n' + f'code = {code};\n' + f'name = {name};\n' + '},\n' + ) + self.__raw = ''.join(( + self.__raw[:start], + f'{field} = (\n', + f'{list_str[:-2]}\n' + ');', + self.__raw[end:] + )) + + def __read_list (self, field: str): + start, end = self.__find_definition_index(field, prefix='(') + text_slice = self.__raw[start:end + 2] + keys = self.__read_fields('name', text_slice) + values = self.__read_fields('code', text_slice) + + if len(keys) != len(values): + raise Exception('Keys and values count differs') + return dict(zip(keys, values)) diff --git a/generator/ligatures.py b/generator/ligatures.py new file mode 100644 index 00000000..f58bfe66 --- /dev/null +++ b/generator/ligatures.py @@ -0,0 +1,164 @@ +''' +Ligatures feature generator +''' + +from typing import List + +ignore_exceptions = { + 'slash_asterisk': [ + "slash' asterisk slash", + "asterisk slash' asterisk" + ], + 'asterisk_slash': [ + "slash asterisk' slash", + "asterisk' slash asterisk" + ], + 'asterisk_asterisk': [ + "slash asterisk' asterisk", + "asterisk' asterisk slash" + ], + "asterisk_asterisk_asterisk": [ + "slash asterisk' asterisk asterisk", + "asterisk' asterisk asterisk slash", + ], + "colon_colon": [ + "colon' colon [less greater]", + "[less greater] colon' colon" + ], + "less_less": ["less' less [asterisk plus dollar]"], + "equal_equal": [ + "bracketleft equal' equal", + "equal' equal bracketright", + "equal [colon exclam] equal' equal", + "[less greater bar slash] equal' equal", + "equal' equal [less greater bar slash]", + "equal' equal [colon exclam] equal" + ], + "equal_equal_equal": [ + "equal [colon exclam] equal' equal equal", + "[less greater bar slash] equal' equal equal", + "equal' equal equal [less greater bar slash]", + "equal' equal equal [colon exclam] equal", + "bracketleft equal' equal equal", + "equal' equal equal bracketright" + ], + "colon_equal": ["equal colon' equal"], + "exclam_equal": ["equal exclam' equal"], + "exclam_equal_equal": ["equal exclam' equal equal"], + "less_equal": [ + "equal less' equal", + "less' equal [less greater bar colon exclam slash]" + ], + "greater_equal": [ + "equal greater' equal", + "greater' equal [less greater bar colon exclam slash]" + ], + "greater_greater": [ + "[hyphen equal] greater' greater", + "greater' greater hyphen", + "[asterisk plus dollar] greater' greater", + "greater' greater equal [equal less greater bar colon exclam slash]" + ], + "bar_bar": [ + "[hyphen equal] bar' bar", + "bar' bar hyphen", + "bar' bar equal [equal less greater bar colon exclam slash]" + ], + "slash_slash": [ + "equal slash' slash", + "slash' slash equal" + ], + "hyphen_hyphen": [ + "[less greater bar] hyphen' hyphen", + "hyphen' hyphen [less greater bar]" + ], +} + +ignore_prefixes = { + 'parenleft question': [ + 'colon', + 'equal' + 'exclaim' + ], + 'less question': ['equal'], + 'parenleft question less': [ + 'equal', + 'exclaim' + ], +} + +# Replacemnt ignore templates map +# ignore sub +ignore_templates = { + 2: [ + "1 1' 2", + "1' 2 2" + ], + 3: [ + "1 1' 2 3", + "1' 2 3 3" + ], + 4: [ + "1 1' 2 3 4", + "1' 2 3 4 4" + ] +} + +# Replacemnt templates map +# sub +replace_templates = { + 2: [ + "LIG 2' by 1_2.liga", + "1' 2 by LIG" + ], + 3: [ + "LIG LIG 3' by 1_2_3.liga", + "LIG 2' 3 by LIG", + "1' 2 3 by LIG" + ], + 4: [ + "LIG LIG LIG 4' by 1_2_3_4.liga", + "LIG LIG 3' 4 by LIG", + "LIG 2' 3 4 by LIG", + "1' 2 3 4 by LIG" + ] +} + +def render_statements (statements: List[str], prefix: str) -> str: + return '\n'.join(map(lambda x: f' {prefix} {x};', statements)) + +def render_template (template: str, glyphs: List[str]) -> str: + for i, _ in enumerate(glyphs): + template = template.replace(str(i + 1), glyphs[i]) + return template + +def render_lookup (replace: List[str], ignore: List[str], glyphs: List[str]) -> str: + name = '_'.join(glyphs) + template = ( + f"lookup {name}" + " { \n" + f"{render_statements(ignore, 'ignore sub')}" + f"{render_statements(replace, 'sub')}" + "\n} " + f"{name};" + ) + return render_template(template, glyphs) + +def get_ignore_prefixes(name: str, length: int) -> List[str]: + ignores: List[str] = [] + tail = '' + for i in range(length - 1): + tail += f' {i + 1}' + for statement, starts in ignore_prefixes.items(): + for start in starts: + if name.startswith(start): + ignores.append(f"{statement} 1' {tail}") + return ignores + +def render_ligature_lookups (ligatures: List[str]) -> str: + result = "" + for name in ligatures: + glyphs = name.split('_') + lenght = len(glyphs) + ignores = ignore_templates[lenght] + get_ignore_prefixes(name, lenght) + replaces = replace_templates[lenght] + result += render_lookup(replaces, ignores, glyphs) + "\n" + return result diff --git a/generator/main.py b/generator/main.py new file mode 100644 index 00000000..97294376 --- /dev/null +++ b/generator/main.py @@ -0,0 +1,41 @@ +""" +Lilex builder performs actions that can be automated. +Generates the ligature code, inserts the rest of the code from 'fea' files, etc. +""" + +from glyphs import GlyphsFile +from fea import read_feature, read_class +from ligatures import render_ligature_lookups + +FILE_PATH = 'Lilex.glyphs' +features = [ + 'ss01', + 'ss02', + 'ss03', + 'ss04', + 'ss05' +] + +classes = [ + 'numbers_hex' +] + +font = GlyphsFile(FILE_PATH) + +# Fill 'calt' feature +font.set_feature('calt', ( + f'{render_ligature_lookups(font.ligatures)}\n' + f'{read_feature("calt/colon")}\n' + f'{read_feature("calt/multiply")}\n' +)) + +# Fill other features +for file in features: + font.set_feature(file, read_feature(file)) +# Fill classes +for file in classes: + font.set_class(file, read_class(file)) + +# Write +font.flush() +print(f'{FILE_PATH} is regenerated.')