-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
105 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["Hcedilla", "Oogonek", "hcedilla", "idotless", "oogonek", "germandbls.cv05", "germandbls.cv12", "ge-cy.loclBGR", "ii-cy.loclBGR", "iishort-cy.loclBGR", "iigrave-cy.loclBGR", "pe-cy.loclBGR", "te-cy.loclBGR", "tse-cy.loclBGR", "sha-cy.loclBGR", "shcha-cy.loclBGR", "softsign-cy.loclBGR", "hardsign-cy.loclBGR", "ia-cy.loclBGR", "Alpha", "Beta", "Gamma", "Delta.002", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega.001", "Alphatonos", "Epsilontonos", "Etatonos", "Iotatonos", "Omicrontonos", "Upsilontonos", "Omegatonos", "Iotadieresis", "Upsilondieresis", "Delta.001", "alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu.001", "nu", "xi", "omicron", "rho", "sigmafinal", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega", "iotatonos", "iotadieresis", "iotadieresistonos", "upsilontonos", "upsilondieresis", "upsilondieresistonos", "omicrontonos", "omegatonos", "alphatonos", "epsilontonos", "etatonos", "alpha.alt01", "alphatonos.alt01", "mu.001.alt", "narrownbspace", "anoteleia", "questiongreek", "colon.valign_eq", "colon.valign_num", "hyphen_hyphen.liga", "parenleft_asterisk.liga", "braceleft_bar.liga", "bracketleft_bar.liga", "bracketright_numbersign.liga", "period_period.liga", "period_period_period.liga", "period_period_equal.liga", "period_period_less.liga", "period_question.liga", "colon_colon.liga", "colon_colon_colon.liga", "colon_colon_equal.liga", "colon_equal.liga", "semicolon_semicolon.liga", "exclam_exclam.liga", "exclam_exclam_period.liga", "exclam_equal.liga", "exclam_equal_equal.liga", "question_period.liga", "question_question.liga", "question_equal.liga", "asterisk_parenright.liga", "asterisk_asterisk.liga", "asterisk_asterisk_asterisk.liga", "asterisk_greater.liga", "asterisk_slash.liga", "numbersign_parenleft.liga", "numbersign_braceleft.liga", "numbersign_bracketleft.liga", "numbersign_colon.liga", "numbersign_exclam.liga", "numbersign_question.liga", "numbersign_equal.liga", "slash_asterisk.liga", "slash_greater.liga", "slash_slash.liga", "slash_slash_slash.liga", "underscore_underscore_parenleft.liga", "hyphen_end.seq", "hyphen_middle.seq", "hyphen_start.seq", "colon_equal_middle.seq", "exclam_equal_middle.seq", "numbersign_end.seq", "numbersign_middle.seq", "numbersign_start.seq", "slash_equal_end.seq", "slash_equal_middle.seq", "slash_equal_start.seq", "slash_slash_equal_end.seq", "slash_slash_equal_middle.seq", "slash_slash_equal_start.seq", "underscore_end.seq", "underscore_middle.seq", "underscore_start.seq", "exclam_equal.liga.ss02", "exclam_equal_equal.liga.ss02", "numbersign_end.ss04.seq", "numbersign_middle.ss04.seq", "numbersign_start.ss04.seq", "asterisk.cv10", "period.spacer", "colon.spacer", "semicolon.spacer", "exclam.spacer", "question.spacer", "asterisk.spacer", "numbersign.spacer", "slash.spacer", "backslash.ss03", "hyphentwo", "nonbreakinghyphen", "hyphen.spacer", "underscore.spacer", "parenleft.spacer", "braceleft.spacer", "bracketleft.spacer", "bracketright.spacer", "guillemetleft", "guillemetright", "ampersand_ampersand.liga", "bar_braceright.liga", "bar_bracketright.liga", "bar_bar.liga", "bar_bar_bar.liga", "bar_bar_bar_greater.liga", "bar_bar_greater.liga", "bar_greater.liga", "dollar_greater.liga", "plus_plus.liga", "plus_plus_plus.liga", "plus_greater.liga", "equal_colon_equal.liga", "equal_exclam_equal.liga", "equal_equal.liga", "equal_equal_equal.liga", "greater_equal.liga", "greater_greater.liga", "greater_greater_greater.liga", "less_exclam_hyphen_hyphen.liga", "less_asterisk.liga", "less_asterisk_greater.liga", "less_bar.liga", "less_bar_bar.liga", "less_bar_bar_bar.liga", "less_bar_greater.liga", "less_dollar.liga", "less_dollar_greater.liga", "less_plus.liga", "less_plus_greater.liga", "less_equal.liga", "less_greater.liga", "less_less.liga", "less_less_less.liga", "less_asciitilde.liga", "less_asciitilde_greater.liga", "less_asciitilde_asciitilde.liga", "less_slash.liga", "less_slash_greater.liga", "asciitilde_greater.liga", "asciitilde_asciitilde.liga", "asciitilde_asciitilde_greater.liga", "asciicircum_equal.liga", "percent_percent.liga", "bar_hyphen_end.seq", "bar_hyphen_middle.seq", "bar_hyphen_start.seq", "bar_bar_hyphen_end.seq", "bar_bar_hyphen_middle.seq", "bar_bar_hyphen_start.seq", "bar_bar_equal_end.seq", "bar_bar_equal_middle.seq", "bar_bar_equal_start.seq", "bar_equal_end.seq", "bar_equal_middle.seq", "bar_equal_start.seq", "bar_underscore_middle.seq", "equal_end.seq", "equal_middle.seq", "equal_start.seq", "greater_hyphen_end.seq", "greater_hyphen_middle.seq", "greater_hyphen_start.seq", "greater_equal_end.seq", "greater_equal_middle.seq", "greater_equal_start.seq", "greater_greater_hyphen_end.seq", "greater_greater_hyphen_middle.seq", "greater_greater_hyphen_start.seq", "greater_greater_equal_end.seq", "greater_greater_equal_middle.seq", "greater_greater_equal_start.seq", "less_hyphen_end.seq", "less_hyphen_middle.seq", "less_hyphen_start.seq", "less_equal_end.seq", "less_equal_middle.seq", "less_equal_start.seq", "less_less_hyphen_end.seq", "less_less_hyphen_middle.seq", "less_less_hyphen_start.seq", "less_less_equal_end.seq", "less_less_equal_middle.seq", "less_less_equal_start.seq", "greater_equal.liga.cv08", "less_equal.liga.cv08", "dollar_greater.liga.cv09", "less_dollar.liga.cv09", "less_dollar_greater.liga.cv09", "bar_greater.liga.cv11", "less_bar.liga.cv11", "equal_equal.liga.ss02", "equal_equal_equal.liga.ss02", "powerSymbol", "powerOnOffSymbol", "heavyCircle", "powerOnSymbol", "powerSleepSymbol", "ampersand.spacer", "bar.spacer", "euro", "cent.cv09", "dollar.cv09", "dollar.spacer", "ratio", "greater.center", "less.center", "asciitilde.original", "plus.spacer", "equal.spacer", "greater.spacer", "less.spacer", "asciitilde.spacer", "asciicircum.spacer", "percent.spacer", "upArrow", "upArrowright", "rightArrow", "downArrowright", "downArrow", "downArrowleft", "leftArrow", "upArrowleft", "leftArrowright", "upArrowdown", "upArrowleftcorner", "upArrowrightcorner", "downArrowleftcorner", "downArrowrightcorner", "rightArrowdowncorner", "rightArrowupcorner", "leftArrowdowncorner", "leftArrowupcorner", "downArrowcounterclockhalf", "downArrowclockhalf", "upArrowleftcounterclock", "upArrowrightclock", "rightArrowleftArrow", "leftArrowrightArrow", "dneighthfullBlock", "dnquarterfullBlock", "dnthreeeighthsfullBlock", "dnhalffullBlock", "dnfiveeighthsfullBlock", "dnthreequartersfullBlock", "dnseveneighthsfullBlock", "fullfullBlock", "uphalffullBlock", "upeighthfullBlock", "lefteighthfullBlock", "leftquarterfullBlock", "leftthreeeighthsfullBlock", "lefthalffullBlock", "leftfiveeighthsfullBlock", "leftthreequartersfullBlock", "leftseveneighthsfullBlock", "righthalffullBlock", "righteighthfullBlock", "lightshademedium", "mediumshademedium", "darkshademedium", "blackCircle", "whiteCircle", "largeCircle", "leftHalfBlackWhiteCircle", "rightHalfBlackWhiteCircle", "lowerHalfBlackWhiteCircle", "upperHalfBlackWhiteCircle", "leftHalfBlackCircle", "rightHalfBlackCircle", "upperRightBlackCircle", "upperLeftArc", "upperRightArc", "lowerRightArc", "lowerLeftArc", "tonos", "tonos.case", "dieresistonos", "uniE0A0", "uniE0A1", "uniE0A2", "uniE0B0", "uniE0B1", "uniE0B2", "uniE0B3", "dotlessjdotbelow", "idotlessdotbelow", "idotlessogonek", "st.ordn", "upArrowleftcounterclock.alt01", "upArrowrightclock.alt01"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"""Lilex font library""" | ||
from .build import DEFAULT_FORMATS, SUPPORTED_FORMATS | ||
from .generator import generate_spacers, render_ligatures | ||
from .glyphs_font import GlyphsFont |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""Lilex font builder module""" | ||
from .const import DEFAULT_FORMATS, SUPPORTED_FORMATS | ||
from .make import make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Lilex builder constants""" | ||
|
||
SUPPORTED_FORMATS = [ | ||
"ttf", | ||
"otf", | ||
"variable" | ||
] | ||
|
||
DEFAULT_FORMATS = [ | ||
"ttf", | ||
"variable" | ||
] | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""OpenType features utils""" | ||
from .name import feature_prefix, name_from_code | ||
from .tpl import NAME_TPL |
File renamed without changes.
13 changes: 0 additions & 13 deletions
13
scripts/builder/const.py → scripts/liblilex/features/tpl.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env python3 | ||
"""A utility for developing pairings to fonts. | ||
I want Italic to have all the same features as a regular font, | ||
this script will allow to control progress | ||
""" | ||
import json | ||
from os import makedirs | ||
|
||
from arrrgs import arg, command, global_args, run | ||
from glyphsLib import GSFont | ||
|
||
REGULAR_FONT_PATH = "sources/Lilex.glyphs" | ||
ITALIC_FONT_PATH = "sources/Lilex-Italic.glyphs" | ||
|
||
|
||
global_args( | ||
arg("--snapshot-dir", "-s", default="__snapshots__", help="Snapshot directory"), | ||
) | ||
|
||
@command( | ||
arg("--markdown", "-m", action="store_true", help="Markdown output"), | ||
) | ||
def progress(args): | ||
"""Finds missing ligatures""" | ||
missing_glyphs = find_missing_glyphs() | ||
snapshot_path = f"{args.snapshot_dir}/missing_glyphs.json" | ||
|
||
with open(snapshot_path, mode="r", encoding="utf-8") as file: | ||
stored_glyphs = json.load(file) | ||
|
||
diff = len(stored_glyphs) - len(missing_glyphs) | ||
progress_value = (diff / len(stored_glyphs)) * 100 | ||
if not args.markdown: | ||
print(f"Glyphs coverage: {progress_value:.2f}%") | ||
return | ||
|
||
print("### Glyphs porting progress") | ||
print(f"") | ||
print() | ||
|
||
print("<details>") | ||
print("<summary>Glyphs status</summary>") | ||
print("<ul>") | ||
for glyph in stored_glyphs: | ||
if glyph in missing_glyphs: | ||
print(f"<li>{glyph}</li>") | ||
else: | ||
print(f"<li><s>{glyph}</s></li>") | ||
print("</ul>") | ||
print("</details>") | ||
|
||
@command() | ||
def snapshot(args): | ||
"""Dumps missing glyphs""" | ||
glyphs = find_missing_glyphs() | ||
makedirs(args.snapshot_dir, exist_ok=True) | ||
with open(f"{args.snapshot_dir}/missing_glyphs.json", mode="w", encoding="utf-8") as file: | ||
json.dump(glyphs, file) | ||
print(f"Missing glyphs saved to {args.snapshot_dir}/missing_glyphs.json") | ||
|
||
def find_missing_glyphs() -> list[str]: | ||
"""Finds missing glyphs""" | ||
target_font = GSFont(REGULAR_FONT_PATH) | ||
source_font = GSFont(ITALIC_FONT_PATH) | ||
missing_glyphs = [] | ||
for glyph in target_font.glyphs: | ||
if glyph.export and glyph.name not in source_font.glyphs: | ||
missing_glyphs.append(glyph.name) | ||
return missing_glyphs | ||
|
||
if __name__ == "__main__": | ||
run() |