Skip to main content

gfsubsets

This is the collection of nam files (codepoint subsets) that are used to subset fonts before serving on the Google Fonts CSS API.

The subset files

The subset definitions are contained in two forms; the "editable" definitions are found in the subsets-input directory, and the machine readable defitions can be found in Lib/gfsubsets/data.

The machine readable files consist of text files with one Unicode codepoint (a hexadecimal number beginning with 0x) on each line; everything after the codepoint is a comment. Blank lines and comment lines beginning # are ignored.

The editable definitions are similar, but for convenience allow the following "directives":

  • Two codepoints separated by .. denote an (inclusive) range; all codepoints within the range are included.
  • The symbol - before a codepoint or range excludes it from the output set.
  • The directive @include(filename) includes the codepoints in filename.
  • The directive @block(XYZ) includes the codepoints in the Unicode block named XYZ.
  • The directive @script(XYZ) includes all codepoints with either the Unicode Script property equal to XYZ or the ScriptExtensions property equal to XYZ

These editable definitions are turned into their machine-readable equivalents using the script scripts/preprocess_namfile.py.

Python interface

This repository also includes the Python module gfsubsets which 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.

Metadata

Release files for gfsubsets 2025.11.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gfsubsets 2025.11.4
File Size Uploaded Provenance Actions
gfsubsets-2025.11.4.tar.gz 1.4 MB With provenance Details for gfsubsets-2025.11.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gfsubsets 2025.11.4
File Interpreter ABI Platform Actions
gfsubsets-2025.11.4-py3-none-any.whl Python 3 none any Details for gfsubsets-2025.11.4-py3-none-any.whl

Total release size: 1.8 MB

Release files / gfsubsets-2025.11.4.tar.gz

Download URL gfsubsets-2025.11.4.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
93a5256bda8aff54b2d9986e9ea15cc9aff48670d912fe27a6da2079fbed8a49
BLAKE2b-256 checksum
How to use checksums
4143f6801e170662b5d97dfde0f9cd1c6e1896da3be04c16af1fc8b8292222fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release files / gfsubsets-2025.11.4-py3-none-any.whl

Download URL gfsubsets-2025.11.4-py3-none-any.whl
Size 438.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba6ae1a53d245824e2645a1200bb35362016576e0313328adfea25071139c965
BLAKE2b-256 checksum
How to use checksums
7dae75785728d59a96c004688b63d78d977f4d7a4a7b474cb640194e9268fe31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Security for gfsubsets 2025.11.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gfsubsets-2025.11.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page