Skip to content

Commit

Permalink
Glyphsets API change (#831)
Browse files Browse the repository at this point in the history
* Update fonts-subset-support.py

* Rewired more glyphsets code

* Revert "Update fonts-subset-support.py"

This reverts commit 22c5c85.

* Update glyphset version
  • Loading branch information
yanone authored Feb 15, 2024
1 parent 7ea7373 commit 339ddfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions Lib/gftools/subsetmerger.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import yaml
from fontmake.font_project import FontProject
from fontTools.designspaceLib import DesignSpaceDocument
from glyphsets import GFGlyphData
from glyphsets import unicodes_per_glyphset
from strictyaml import HexInt, Map, Optional, Seq, Str, Enum
from ufomerge import merge_ufos

Expand Down Expand Up @@ -59,11 +59,7 @@ def prepare_minimal_subsets(subsets):
for subset in subsets:
# Resolved named subsets to a set of Unicode using glyphsets data
if "name" in subset:
unicodes = [
x["unicode"]
for x in GFGlyphData.glyphs_in_glyphsets([subset["name"]])
if x["unicode"]
]
unicodes = unicodes_per_glyphset(subset["name"])
if not unicodes:
raise ValueError("No glyphs found for subset " + subset["name"])
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
'glyphsLib',
'gflanguages>=0.4.0',
'gfsubsets>=2024.02.05',
'glyphsets>=0.2.1',
'glyphsets>=0.6.13',
'PyGithub',
'pillow',
# 3.7.0 fixed a bug on parsing some METADATA.pb files.
Expand Down

0 comments on commit 339ddfa

Please sign in to comment.