Skip to content

Commit

Permalink
Fix return error
Browse files Browse the repository at this point in the history
  • Loading branch information
ftCLI committed Sep 26, 2023
1 parent f085757 commit b9d03e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions foundryToolsCLI/Lib/Font.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def set_modified_timestamp(self, timestamp: int) -> None:
"""
self["head"].modified = timestamp

def get_real_extension(self) -> str:
def get_real_extension(self) -> t.Optional[str]:
"""
This function returns the file extension of a font file based on its flavor or type.
:return: A string representing the file extension of a font file. If the font has a flavor, the
Expand All @@ -388,6 +388,7 @@ def get_real_extension(self) -> str:
return ".ttf"
elif self.is_otf:
return ".otf"
return None

def ttf_decomponentize(self) -> None:
"""
Expand Down Expand Up @@ -643,7 +644,7 @@ def get_ui_name_ids(self) -> list:
ui_name_ids.append(record.Feature.FeatureParams.UINameID)
return sorted(set(ui_name_ids))

def reorder_ui_name_ids(self):
def reorder_ui_name_ids(self) -> None:
"""
Takes the IDs of the UI names in the name table and reorders them to start at 256
"""
Expand Down Expand Up @@ -897,14 +898,13 @@ def get_font_v_metrics(self) -> dict:

return font_v_metrics

def get_font_feature_tags(self) -> list:
def get_font_feature_tags(self) -> t.List[str]:
"""
Returns a sorted list of all the feature tags in the font's GSUB and GPOS tables
:return: A list of feature tags.
"""

feature_tags = set()
feature_tags = set[str]()
for table_tag in ("GSUB", "GPOS"):
if table_tag in self:
if not self[table_tag].table.ScriptList or not self[table_tag].table.FeatureList:
Expand Down

0 comments on commit b9d03e2

Please sign in to comment.