Skip to main content

Fonts manager for matplotlib

Project description

中文文档

mplfonts

Fonts manager for matplotlib

This is a python package and command line tool to manage your matplotlib fonts. You can easily resolve the "tofu" problem when plotting with CJK(Chinese, Japanese, Korean) languages.

Installation

You can install mplfonts with pip

$ pip install mplfonts

Quickstart

You can just run one command to solve the "tofu" problem:

$ mplfonts quickstart

After that, try to use matplotlib to plot an image with CJK text, it should be normal.

Now you can enjoy it.

Usage

This package's aim is not only to solve "tofu" problem, but also to manage matplotlib fonts. When you installed mplfonts, there are some open-source CJK fonts already included, they are:

  • Noto Sans Mono CJK SC
  • Noto Serif CJK SC
  • Noto Sans CJK SC
  • Source Han Serif SC
  • Source Han Mono SC If you have finished the quickstart, You can shift fonts in you script like:
from mplfonts import use_font

use_font('Noto Serif CJK SC')

# write your plotting code below

If you want to setup some custom fonts, you can install by command:

$ mplfonts install --update <your font file path>

Also, you can install all fonts in a directory(folder) by:

$ mplfonts install --update <your directory path>

Fonts Source

You can access some open-source fonts from google and adobe, here is some resource:

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

mplfonts-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distributions

mplfonts-0.0.1-py3.6.egg (79.9 MB view details)

Uploaded Source

mplfonts-0.0.1-py3-none-any.whl (79.9 MB view details)

Uploaded Python 3

File details

Details for the file mplfonts-0.0.1.tar.gz.

File metadata

  • Download URL: mplfonts-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for mplfonts-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ad2b0c7941628e206d08bb47d65071933fe19a12dabb9931c4c2304f2683c71
MD5 68dfef5def17ec0774f33c33d5045f2f
BLAKE2b-256 a3178f39a9a00ae4cbde7cff88d73939a6f2b514975122ff76625e346edbd98c

See more details on using hashes here.

File details

Details for the file mplfonts-0.0.1-py3.6.egg.

File metadata

  • Download URL: mplfonts-0.0.1-py3.6.egg
  • Upload date:
  • Size: 79.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for mplfonts-0.0.1-py3.6.egg
Algorithm Hash digest
SHA256 7000df59b5e1c897e376916724d29dcd079795ff1d05b63d552e029848489352
MD5 b4165a57dc9e9161fe9703038bd8b4dc
BLAKE2b-256 12e69be3322448fc81d80a3c8839175d3080043807ac7a67e0a00fd014f9e7e8

See more details on using hashes here.

File details

Details for the file mplfonts-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mplfonts-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 79.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for mplfonts-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36ca834d0a874e6e1a47ab2063a8731ede18644e0af13f294b7f0af7f50d70f0
MD5 95fae4265cf76b7b4289cb99de578b5a
BLAKE2b-256 72dc9043e99350fc9c17ecaddee89008650aab539313c9ba2a6daaf8e93b2701

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