1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

devcontainerを使用したtkinterの文字化け解消

Posted at

事象

devcontainerを使用して構築したpythonのコンテナ上でtkinterを使用したが、
日本語表示が豆腐(☐)になってしまう
image.png

環境

Windows11 Home 23H2
vscode 1.85.1
devcontainer v0.327.0
wsl v0.81.8
Dockerイメージ python:3.11

原因

使用しているDockerイメージに日本語フォントが入っていない

対応

Dockerfileに以下を追加し、日本語フォントをインストールする

RUN apt-get install -y fonts-takao-gothic 

image.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?