japanize-kivy
インポートするだけで Kivy が日本語を表示できるようになります
インストール
pip でインストールします。
$ pip install japanize-kivy
使い方
パッケージをインポートするだけです。
import japanize_kivy
Kivy のアプリケーションで日本語が IPAex ゴシックフォントで表示されます。
フォントを差し替える
自分で用意したフォントを使いたいときは japanize() にパスを渡します。
import japanize_kivy
japanize_kivy.japanize("~/fonts/NotoSansJP-Regular.ttf")
太字や斜体に別のファイルを使う場合は、あわせて指定します。
japanize_kivy.japanize(
"~/fonts/NotoSansJP-Regular.ttf",
bold="~/fonts/NotoSansJP-Bold.ttf",
)
name を指定すると別名で登録されるので、特定のウィジェットにだけ使えます。
同梱の IPAex ゴシックは japanize_kivy.BUNDLED_FONT_NAME の名前で引けるため、差し替えても併用できます。
name = japanize_kivy.japanize("~/fonts/Mincho.ttf", name="mincho")
Label(text="見出し", font_name=name)
Label(text="本文", font_name=japanize_kivy.BUNDLED_FONT_NAME)
コードを変えずに差し替えたいときは、環境変数 JAPANIZE_KIVY_FONT にパスを指定します。
$ JAPANIZE_KIVY_FONT=~/fonts/NotoSansJP-Regular.ttf python app.py
フォントは 引数 > 環境変数 > 同梱の IPAex ゴシック の順に優先されます。 指定したフォントを使えないときは、別のフォントで代替せずにエラーになります。
なお、フォントはウィジェットを作る前に決めてください。 登録し直しても、生成済みのウィジェットはすぐには新しいフォントになりません。 再描画された時点で切り替わるため、新旧のフォントが混在した状態になります。
サンプル
example ディレクトリ以下にサンプルがあります。
$ python example/greet.py
ライセンス
このパッケージは IPAex ゴシックフォントを同梱して再配布しているため、 表示に使うフォントを差し替えたかどうかにかかわらず、そのライセンスに同意してください。 自分で用意したフォントに差し替えた場合は、あわせてそのフォントのライセンスにも従ってください。
同梱しているフォントのライセンスは次のように確認できます。
import japanize_kivy
japanize_kivy.show_license()
Metadata
Release files for japanize-kivy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| japanize_kivy-0.2.0.tar.gz | 4.2 MB | With provenance | Details for japanize_kivy-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| japanize_kivy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for japanize_kivy-0.2.0-py3-none-any.whl |
Total release size: 8.4 MB
Release files / japanize_kivy-0.2.0.tar.gz
| Download URL | japanize_kivy-0.2.0.tar.gz |
|---|---|
| Size | 4.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8793eb02843dd36cad5e250a78148c3224266b4334d2ef38859928573cf23e8
|
|
BLAKE2b-256 checksum How to use checksums |
754ff81a12675529966e25d47f2e07a7698b19ae57743e51d46b84dfbc4b82ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / japanize_kivy-0.2.0-py3-none-any.whl
| Download URL | japanize_kivy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2f3217c04fc49b8dafac72c5a6ec4bf9c16209199af54e0e4e2b2f8860e06e8
|
|
BLAKE2b-256 checksum How to use checksums |
9727f835b9a59526a52a879bfd7313f4a97ee76cf0d318c974d3b5ae4a8d13d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logSecurity for japanize-kivy 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for japanize_kivy-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.