Skip to content

Commit

Permalink
Added links to stub files
Browse files Browse the repository at this point in the history
  • Loading branch information
yanone committed Feb 9, 2024
1 parent 7e7f186 commit 4c5600b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GLYPHSETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
GF_Latin_Kernel is **statically** defined as:

* Script: Latin
* Codepoints defined in [GF_Latin_Kernel.stub.nam](/GF_glyphsets/Latin/definitions/GF_Latin_Kernel.stub.nam)

> [!WARNING]
> Since this glyphset has no defined languages, it can't be checked via Fontbakery's `shape_languages` check. Please add language code definions here.
Expand All @@ -29,6 +30,8 @@ The resulting glyphset can be found here: [GF_Latin_Kernel.nam](/Lib/glyphsets/d
GF_Latin_Core is **statically** defined as:

* Script: Latin
* Codepoints defined in [GF_Latin_Core.stub.nam](/GF_glyphsets/Latin/definitions/GF_Latin_Core.stub.nam)
* Unencoded glyphs defined in [GF_Latin_Core.stub.glyphs](/GF_glyphsets/Latin/definitions/GF_Latin_Core.stub.glyphs)
* List of languages: `Albanian (sq_Latn), Catalan (ca_Latn), Croatian (hr_Latn), Czech (cs_Latn), Danish (da_Latn), Dutch (nl_Latn), English (en_Latn), Finnish (fi_Latn), French (fr_Latn), German (de_Latn), Hungarian (hu_Latn), Icelandic (is_Latn), Italian (it_Latn), Latvian (lv_Latn), Lithuanian (lt_Latn), Maltese (mt_Latn), Norwegian Bokmål (nb_Latn), Polish (pl_Latn), Portuguese (pt_Latn), Romanian (ro_Latn), Serbian (Latin) (sr_Latn), Slovak (sk_Latn), Spanish (es_Latn), Swedish (sv_Latn), Turkish (tr_Latn), Welsh (cy_Latn)`

The resulting glyphset can be found here: [GF_Latin_Core.nam](/Lib/glyphsets/definitions/nam/GF_Latin_Core.nam)
Expand Down Expand Up @@ -56,6 +59,7 @@ The resulting glyphset can be found here: [GF_Latin_African.nam](/Lib/glyphsets/
GF_Arabic_Core is **statically** defined as:

* Script: Arabic
* Codepoints defined in [GF_Arabic_Core.stub.nam](/GF_glyphsets/Arabic/definitions/GF_Arabic_Core.stub.nam)
* List of languages: `Arabic (ar_Arab), Persian (fa_Arab), Urdu (ur_Arab)`

The resulting glyphset can be found here: [GF_Arabic_Core.nam](/Lib/glyphsets/definitions/nam/GF_Arabic_Core.nam)
Expand Down
14 changes: 14 additions & 0 deletions Lib/glyphsets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,16 @@ def description_per_glyphset(glyphset_name):
historical = glyphset_definitions[glyphset_name].get("historical", False)
population = glyphset_definitions[glyphset_name].get("population", False)

root_folder = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "..", "GF_Glyphsets")
)
nam_stub_path = os.path.join(
root_folder, script, "definitions", f"{glyphset_name}.stub.nam"
)
glyphs_stub_path = os.path.join(
root_folder, script, "definitions", f"{glyphset_name}.stub.glyphs"
)

warning = False
md = ""

Expand All @@ -360,6 +370,10 @@ def description_per_glyphset(glyphset_name):
else:
md += f"{glyphset_name} is **statically** defined as:\n\n"
md += f"* Script: {script}\n"
if os.path.exists(nam_stub_path):
md += f"* Codepoints defined in [{os.path.basename(nam_stub_path)}](/GF_glyphsets/{script}/definitions/{os.path.basename(nam_stub_path)})\n"
if os.path.exists(glyphs_stub_path):
md += f"* Unencoded glyphs defined in [{os.path.basename(glyphs_stub_path)}](/GF_glyphsets/{script}/definitions/{os.path.basename(glyphs_stub_path)})\n"
if regions:
md += f"* All languages of the countries `{', '.join(sorted(map(add_country, regions)))}`\n"
if population:
Expand Down

0 comments on commit 4c5600b

Please sign in to comment.