Skip to main content

noto-cjk

Install Noto CJK fonts on demand from PyPI, and locate them from Python.

The noto-cjk package is a meta-package: it ships no font files by default and provides only a small Python API. The actual fonts live in a family of noto-cjk-* packages, one per font file, so you install only what you need instead of a single multi-hundred-megabyte download.

$ pip install "noto-cjk"                    # API only, no fonts
$ pip install "noto-cjk[sans-sc]"           # Sans, Simplified Chinese, Regular + Bold
$ pip install "noto-cjk[serif-jp-regular]"  # Serif, Japanese, Regular
$ pip install "noto-cjk[sans]"              # Sans OpenType Collection (all languages)

The 1 + N model

Package Contents
noto-cjk Python API only, no fonts.
noto-cjk-sans-sc-regular, … One NotoSansCJK..-*.otf file each (16 packages).
noto-cjk-serif-..-.., … One NotoSerifCJK..-*.otf file each (16 packages).
noto-cjk-sans-otc, noto-cjk-serif-otc The NotoSansCJK-Regular.ttc / NotoSerifCJK-Regular.ttc collections.

Fonts are bundled Regular + Bold for four languages: Simplified Chinese (sc), Traditional Chinese (tc), Japanese (jp), Korean (kr).

The Sans OpenType Collection (NotoSansCJK-Regular.ttc) additionally embeds the Mono sub-fonts, as published upstream.

Extras

The noto-cjk package exposes a three-level extra matrix:

Level Form Example Installs
family {family} sans, serif the OTC (all four languages, one .ttc)
language {family}-{lang} sans-sc, serif-jp Regular + Bold OTFs
single font {family}-{lang}-{style} sans-sc-regular, serif-jp-bold one OTF

Where family ∈ {sans, serif}, lang ∈ {sc, tc, jp, kr}, and style ∈ {regular, bold}.

$ pip install "noto-cjk[sans]"             # -> noto-cjk-sans-otc
$ pip install "noto-cjk[sans-sc]"          # -> noto-cjk-sans-sc-regular + noto-cjk-sans-sc-bold
$ pip install "noto-cjk[sans-sc-regular]"  # -> noto-cjk-sans-sc-regular

Python API

from noto_cjk import list_fonts, font_path, otc_path, get

for f in list_fonts():          # 16 OTF fonts
    print(f.family, f.lang, f.style, f.installed, f.path)

font_path("sans", "sc", "regular")  # -> Path(.../NotoSansCJKsc-Regular.otf)
otc_path("sans")                    # -> Path(.../NotoSansCJK-Regular.ttc)

f = get("serif", "jp", "bold")
print(f.package)                    # 'noto-cjk-serif-jp-bold'
print(f.extra)                      # 'serif-jp-bold'

Requesting a font that is not installed raises FontNotInstalled with a ready-to-run install hint:

noto-cjk-sans-sc-regular is not installed.
Install it with: pip install 'noto-cjk[sans-sc-regular]'

Naming convention

Every font is identified by a (family, lang, style) triple. The distribution name, module name, and extra all derive mechanically from it:

  • distributionnoto-cjk-{family}-{lang}-{style} (e.g. noto-cjk-sans-sc-regular)
  • modulenoto_cjk_{family}_{lang}_{style} (e.g. noto_cjk_sans_sc_regular)
  • extra{family}-{lang}-{style} (e.g. sans-sc-regular)

The OpenType Collections are noto-cjk-{family}-otc with the extra {family}.

Font versions

Family Upstream version
Noto Sans CJK 2.004
Noto Serif CJK 2.003

All noto-cjk-* packages in a release share the same package version and are published together.

License

The noto-cjk code is Apache-2.0. The bundled fonts are licensed under the SIL Open Font License, Version 1.1 (see each noto-cjk-* package).

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

noto_cjk-0.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: noto_cjk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for noto_cjk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f60e4c7f60de762d605aa7c1f41b2f2c783723914824a8de419c284370103884
MD5 00740f222b764f3bbb08e69f711aebdc
BLAKE2b-256 47470a2ec6fe2f0066719ba4e93465d7dd1471418ef9433388a1fce635ffad01

See more details on using hashes here.

Supported by

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