Skip to content

Commit

Permalink
Run fontmake in-process, so we have integrated logging
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Apr 26, 2024
1 parent d8c286b commit 48aa7af
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/fontra_compile/compile_fontmake_action.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import itertools
import os
import pathlib
import subprocess
import tempfile
from contextlib import aclosing, asynccontextmanager
from dataclasses import dataclass, field
from typing import AsyncGenerator

from fontmake.__main__ import main as fontmake_main
from fontra.backends import newFileSystemBackend
from fontra.backends.copy import copyFont
from fontra.core.protocols import ReadableFontBackend
Expand Down Expand Up @@ -50,8 +50,7 @@ async def process(

addInstances(designspacePath)

command = [
"fontmake",
arguments = [
"-m",
os.fspath(designspacePath),
"-o",
Expand All @@ -61,11 +60,11 @@ async def process(
]

for option, value in self.options.items():
command.append(f"--{option}")
arguments.append(f"--{option}")
if value:
command.append(value)
arguments.append(value)

subprocess.run(command, check=True)
fontmake_main(arguments)


def addInstances(designspacePath):
Expand Down

0 comments on commit 48aa7af

Please sign in to comment.