Skip to content

Commit

Permalink
x11-fonts/py-gfsubsets: Add py-gfsubsets 2024.2.5
Browse files Browse the repository at this point in the history
This is the collection of nam files (codepoint subsets) that are used to subset
fonts before serving on the Google Fonts CSS API.

The Python module gfsubsets provides an interface to these subset definitions.
It exports the following functions:
- CodepointsInFont(filename): Lists the Unicode codepoints supported by the font
- ListSubsets(): Returns the name of all defined subsets.
- SubsetsForCodepoint(cp): Returns the names of all subsets including the
  codepoint.
- SubsetForCodepoint(cp): Returns the name of the "most relevant" subset
  including the codepoint.
- CodepointsInSubset(subset): Returns a set of codepoints included in the
  subset.
- SubsetsInFont(filename, min_pct, ext_min_pct): Returns the name of subsets
  "well" supported by a font.
  • Loading branch information
sunpoet committed Feb 21, 2024
1 parent 0532aa3 commit 8433ea8
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions x11-fonts/Makefile
Expand Up @@ -243,6 +243,7 @@
SUBDIR += py-fontfeatures
SUBDIR += py-fontmake
SUBDIR += py-gflanguages
SUBDIR += py-gfsubsets
SUBDIR += py-glyphsLib
SUBDIR += py-opentype-sanitizer
SUBDIR += py-opentypespec
Expand Down
23 changes: 23 additions & 0 deletions x11-fonts/py-gfsubsets/Makefile
@@ -0,0 +1,23 @@
PORTNAME= gfsubsets
PORTVERSION= 2024.2.5
CATEGORIES= x11-fonts python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Codepoint definitions for the Google Fonts subsetter
WWW= https://github.com/googlefonts/nam-files

LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61.0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools_scm>=6.0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}

USES= python:3.9+
USE_PYTHON= autoplist concurrent pep517

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions x11-fonts/py-gfsubsets/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1708448864
SHA256 (gfsubsets-2024.2.5.tar.gz) = 83d4312dadc1d4c313b3e8e68f80b2272499454d33a0535875b399c078ca3da4
SIZE (gfsubsets-2024.2.5.tar.gz) = 1369868
9 changes: 9 additions & 0 deletions x11-fonts/py-gfsubsets/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
--- pyproject.toml.orig 2024-02-05 09:16:01 UTC
+++ pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["setuptools >= 61.0", "setuptools-scm>=8.0"]
+requires = ["setuptools >= 61.0", "setuptools-scm>=6.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
15 changes: 15 additions & 0 deletions x11-fonts/py-gfsubsets/pkg-descr
@@ -0,0 +1,15 @@
This is the collection of nam files (codepoint subsets) that are used to subset
fonts before serving on the Google Fonts CSS API.

The Python module gfsubsets provides an interface to these subset definitions.
It exports the following functions:
- CodepointsInFont(filename): Lists the Unicode codepoints supported by the font
- ListSubsets(): Returns the name of all defined subsets.
- SubsetsForCodepoint(cp): Returns the names of all subsets including the
codepoint.
- SubsetForCodepoint(cp): Returns the name of the "most relevant" subset
including the codepoint.
- CodepointsInSubset(subset): Returns a set of codepoints included in the
subset.
- SubsetsInFont(filename, min_pct, ext_min_pct): Returns the name of subsets
"well" supported by a font.

0 comments on commit 8433ea8

Please sign in to comment.