Skip to main content

Query a font in Fedora release

Project description

Fontquery

pip version badge tag badge license badge

fontquery is a tool to query fonts in the certain Fedora release.

How to install

$ pip3 install fontquery

Or in Fedora,

# dnf install fontquery

How to install from git

$ pip3 install --user build wheel
$ python3 -m build
$ pip3 install --user dist/fontquery*.whl

Or in Fedora,

# dnf install python3-build python3-wheel
$ python3 -m build
$ pip3 install --user dist/fontquery*.whl

Usage

usage: fontquery [-h] [-C] [--disable-cache] [-f FILENAME_FORMAT] [-r RELEASE] [-l LANG]
                 [-m {fcmatch,fclist,json,html}] [-O OUTPUT_DIR] [-t {minimal,extra,all}] [-T TITLE] [-v] [-V]
                 [args ...]

Query fonts

positional arguments:
  args                  Queries (default: None)

options:
  -h, --help            show this help message and exit
  -C, --clean-cache     Clean caches before processing (default: False)
  --disable-cache       Enforce processing everything even if not updating (default: False)
  -f FILENAME_FORMAT, --filename-format FILENAME_FORMAT
                        Output filename format. only take effects with --mode=html (default:
                        {platform}-{release}-{target}.{mode})
  -r RELEASE, --release RELEASE
                        Release number such as "rawhide" and "39". "local" to query from current environment
                        instead of images (default: ['local'])
  -l LANG, --lang LANG  Language list to dump fonts data into JSON (default: None)
  -m {fcmatch,fclist,json,html}, --mode {fcmatch,fclist,json,html}
                        Action to perform for query (default: fcmatch)
  -O OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Output directory (default: .)
  -t {minimal,extra,all}, --target {minimal,extra,all}
                        Query fonts from (default: minimal)
  -T TITLE, --title TITLE
                        Page title format. only take effects with --mode=html (default: {platform} {release}:
                        {target})
  -v, --verbose         Show more detailed logs (default: 0)
  -V, --version         Show version (default: False)
usage: fontquery-diff [-h] [-C] [--disable-cache] [--disable-update] [-l LANG] [--loose-comparison] [-o OUTPUT] [-P {fedora,centos}]
                      [-R {html,text}] [-t {minimal,extra,all}] [-v] [-V]
                      [compare_a] [compare_b]

Show difference between releases

positional arguments:
  compare_a             Release to compare (default: rawhide)
  compare_b             Release to compare (default: local)

options:
  -h, --help            show this help message and exit
  -C, --clean-cache     Clean up caches before processing (default: False)
  --diff-only           Show diff only (default: False)
  --disable-cache       Enforce processing everything even if not updating (default: False)
  --disable-update      Do not update the container image (default: False)
  -l, --lang LANG       Language list to dump fonts data into JSON (default: None)
  --loose-comparison    Do not compare results accurately (default: False)
  -o, --output OUTPUT   Output file (default: -)
  -P, --product {fedora,centos}
                        Product name to operate (default: fedora)
  -R, --render {html,text}
  -t, --target {minimal,extra,all}
                        Query fonts from (default: minimal)
  -v, --verbose         Show more detailed logs (default: 0)
  -V, --version         Show version (default: False)
usage: fontquery-pkgdiff [-h] [-C] [--disable-cache] [--disable-update] [-r RELEASE] [-l LANG] [--loose-comparison] [-o OUTPUT]
                         [-P {fedora,centos}] [-R {html,text}] [-t {minimal,extra,all}] [-v] [-V]
                         package [package ...]

Check if a given package makes any difference

positional arguments:
  package               Test package to see difference

options:
  -h, --help            show this help message and exit
  -C, --clean-cache     Clean up caches before processing (default: False)
  --diff-only           Show diff only (default: False)
  --disable-cache       Enforce processing everything even if not updating (default: False)
  --disable-update      Do not update the container image (default: False)
  -r, --release RELEASE
                        Target release to check (default: rawhide)
  -l, --lang LANG       Language list to dump fonts data into JSON (default: None)
  --loose-comparison    Do not compare results accurately (default: False)
  -o, --output OUTPUT   Output file (default: -)
  -P, --product {fedora,centos}
                        Product name to operate (default: fedora)
  -R, --render {html,text}
  -t, --target {minimal,extra,all}
                        Query fonts from (default: minimal)
  -v, --verbose         Show more detailed logs (default: 0)
  -V, --version         Show version (default: False)

To query sans-serif for Hindi on Fedora 36,

$ fontquery -r 36 sans-serif:lang=hi
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"

To generate JSON from default-fonts installed environment:

$ fontquery -m json -t minimal
...

To generate html table:

$ fontquery -m json -t minimal | fq2html -o minimal.html -

Or simply

$ fontquery -m html -t minimal -r 40

To check difference between local and reference:

$ fontquery-diff -R text rawhide local

To check difference but ignore insignificant changes such as filename:

$ fontquery-diff --loose-comparison -R text

To check difference with certain packages:

$ fontquery-pkgdiff /path/to/package ...

For developers

Before committing something into git repository, you may want to do:

$ git config core.hooksPath hooks

to make sure our hook scripts works.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fontquery-1.35.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fontquery-1.35-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file fontquery-1.35.tar.gz.

File metadata

  • Download URL: fontquery-1.35.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fontquery-1.35.tar.gz
Algorithm Hash digest
SHA256 4bbb68585f894c43da1b18a8e285407f60a555a6ba6b1a7755be4f6036cf1658
MD5 f23bca4b24b5019e2bb426d9cac05819
BLAKE2b-256 8b0a8bc3d3fc55f1359263c69d1eed8f08c7e119f66160edf058e2facb82e0e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontquery-1.35.tar.gz:

Publisher: publish.yml on fedora-i18n/fontquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fontquery-1.35-py3-none-any.whl.

File metadata

  • Download URL: fontquery-1.35-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fontquery-1.35-py3-none-any.whl
Algorithm Hash digest
SHA256 8f280e85246cd63a371c11db42c69176ecf5280dea31b158d0f11e0fb4db61f7
MD5 ee793f8146ddcc9e879405bc2067ebe5
BLAKE2b-256 bad21e5deef8ec4c6dd772a36aab73c1423c1908fd9cf5a0db18167dab41b7aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for fontquery-1.35-py3-none-any.whl:

Publisher: publish.yml on fedora-i18n/fontquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page