Skip to content

Commit

Permalink
Merge pull request #180 from ftCLI/dev
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
ftCLI authored Jul 18, 2024
2 parents b218c5f + 6f60a5e commit 381c8b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 7 additions & 7 deletions foundryToolsCLI/CLI/ftcli_hhea.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def cli(
):
"""A command line tool to manipulate the ``hhea`` table."""

if not any([rise, run, offset, ascent, descent, linegap, recalc_offset]):
if not any([rise, run, offset, ascent, descent, linegap, recalc_offset]) is not None:
logger.error(Logs.no_parameter)
return

Expand All @@ -67,22 +67,22 @@ def cli(
hhea_table: TableHhea = font["hhea"]
hhea_table_copy = copy(hhea_table)

if rise:
if rise is not None:
hhea_table.set_caret_slope_rise(rise)

if run:
if run is not None:
hhea_table.set_caret_slope_run(run)

if offset:
if offset is not None:
hhea_table.set_caret_offset(offset)

if ascent:
if ascent is not None:
hhea_table.set_ascent(ascent)

if descent:
if descent is not None:
hhea_table.set_descent(descent)

if linegap:
if linegap is not None:
hhea_table.set_linegap(linegap)

if recalc_offset:
Expand Down
5 changes: 4 additions & 1 deletion foundryToolsCLI/Lib/Font.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,10 @@ def get_file_name(self, source) -> str:
source = 1

if source == 1:
return f"{self.guess_family_name()}-{self.guess_subfamily_name()}".replace(" ", "")
return (
f"{self.guess_family_name()}-{self.guess_subfamily_name()}"
.replace(" ", "").replace(".", "")
)
elif source == 2:
return self["name"].getDebugName(6)
elif source == 3:
Expand Down

0 comments on commit 381c8b6

Please sign in to comment.