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.

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.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

pymupdf_fonts-1.0.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymupdf_fonts-1.0.0.tar.gz
  • Upload date:
  • Size: 1.3 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.0.tar.gz
Algorithm Hash digest
SHA256 11f1c62717b9d4edd4ae22ccb82711ce87138325a6bbf20dc5f25e3e8de20ef0
MD5 f568bc2384fb6e56cef6e999ba29fa86
BLAKE2b-256 85b8f78703852347767853b8bd47034459614023ba63b8734b45dc5130808619

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymupdf_fonts-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 848fbcfe7f8e9bcca87a39d3340f3f616099436a36cd698afcfb2922b566cfaa
MD5 64ffb62f3f1d93c0572394a02fc67f33
BLAKE2b-256 80b6ff8e0cb89bf3438a8611e2a9b65e83d341d0ac22dad01ff2acf7bdd5ab16

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