diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d16af19..4e3dcf3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: args: ["--profile", "black"] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 diff --git a/src/fontra_compile/__main__.py b/src/fontra_compile/__main__.py index a9fdb80..f68cabf 100644 --- a/src/fontra_compile/__main__.py +++ b/src/fontra_compile/__main__.py @@ -1,7 +1,8 @@ import argparse import asyncio import pathlib -from importlib.metadata import entry_points + +from fontra.backends import getFileSystemBackend from .builder import Builder @@ -23,11 +24,7 @@ async def main_async(): args.glyph_names.replace(",", " ").split() if args.glyph_names else None ) - fileType = sourceFontPath.suffix.lstrip(".").lower() - backendEntryPoints = entry_points(group="fontra.filesystem.backends") - entryPoint = backendEntryPoints[fileType] - backendClass = entryPoint.load() - reader = backendClass.fromPath(sourceFontPath) + reader = getFileSystemBackend(sourceFontPath) builder = Builder(reader, glyphNames) await builder.setup() ttFont = await builder.build()