Skip to main content

Collection of font binaries for use in PyMuPDF

Project description

Release date: July 31, 2020

Author

  • Jorj X. McKie

Introduction

This is a collection of fonts that can be used by PyMuPDF applications for writing text to PDFs.

The fonts are provided encoded in compressed base64 format, wrapped as Python variables.

The primary motivation for this approach is two-fold: (1) keep the PyMuPDF binary module size within reasonable limits and (2) enable inclusion of fonts not supported by the MuPDF library. We may extend this repository with Google’s NOTO fonts.

To use a certain font, its corresponding Python value is imported, which automatically decompresses and decodes the font’s binary image into a bytes object. This value can then be used as a fontbuffer by any PyMuPDF method which needs a font.

Currently the following fonts made by Mozilla are provided: * FiraGO font family, sans serif proportional fonts with support for 68 languages and the following scripts: Latin, Cyrillic, Greek, Arabic, Hebrew, Thai, Georgian and Devanagari. Support for the variants Regular, Bold, Ialic and Bold-Italic. Use this font as a viable “universal” alternative to the “Droid Sans Fallback Regular” font, which is included in the PyMuPDF package (embedded in the binary extension module). * FiraMono font family, sans serif mono-spaced fonts with support for dozens of languages and the scripts Latin, Cyrillic, Greek. Supports the weights Regular and Bold (no Italic). Can be used instead of Courier for a nicer look. * Space Mono (new in version 1.0.1) a nice and small-sized mono-spaced font family. Space Mono is an original fixed-width type family designed by Colophon Foundry for Google Design. It supports a Latin Extended glyph set, enabling typesetting for English and other Western European languages. Part of Google Fonts and also licensed by the Open Font License <https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL>. Supports Regular, Bold, Italic and Bild-Italic.

Installation

pymupdf_fonts is a pure Python package provided as a wheel. As such it is Python version independent. The fonts provided here are lzma-compressed. This is a standard module in Python 3. Usage and Documentation ========================

Using the fonts is documented in PyMuPDF.

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

pymupdf_fonts-1.0.2.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

pymupdf_fonts-1.0.2-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file pymupdf_fonts-1.0.2.tar.gz.

File metadata

  • Download URL: pymupdf_fonts-1.0.2.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.7.8

File hashes

Hashes for pymupdf_fonts-1.0.2.tar.gz
Algorithm Hash digest
SHA256 42f0e2b8dadb2ad7b68744dc2b347935132be5fdafaf7717d644dd90111387f5
MD5 a2abfa4d71bdd8bb839546c88c6a7f7f
BLAKE2b-256 d2a481f96ff2fd907dd281dd0a51fc16a1dd8cfdfb9c1bef871e67b65005aaef

See more details on using hashes here.

File details

Details for the file pymupdf_fonts-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pymupdf_fonts-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.7.8

File hashes

Hashes for pymupdf_fonts-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3fa74a1501bf5b64db30b7bd94266b232b57a6cd2469c189b63396400304094d
MD5 be8c7c66af104e64d97b9f3817705151
BLAKE2b-256 1d08ba4dd168f67410586bcfc4dcf54587b5be96318a0a33542b5341d36441ce

See more details on using hashes here.

Supported by

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