Japanese text not displaying correctly in PySide6 application (Verin AM62, Yocto)

Hi,

I’m running a PySide6 (Qt for Python) application on my Verdin AM62 module built using the Yocto Project.
The application runs fine, but Japanese text (for example, “こんにちは”) appears as blank boxes.
This likely means that the required Japanese fonts or locale data are missing in my Yocto image.

Could someone please guide me on the exact steps needed to enable Japanese font rendering in my Qt application?
For example:

  • Which font packages should I add to IMAGE_INSTALL
  • Do I need to add any specific locale or Qt plugin settings in the Yocto configuration?

Thanks in advance!
Raju

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I can provide guidance on enabling Japanese font rendering for your PySide6 application on Verdin AM62 based on the available documentation.

Font Package Configuration

For Japanese font support in your Yocto build, you need to add specific font packages to your local.conf file (1). Based on the QtWayland deployment example for AM62, you should include these font packages in your IMAGE_INSTALL:

IMAGE_INSTALL:append = " ttf-droid-sans ttf-droid-sans-fallback ttf-droid-sans-mono ttf-droid-serif freetype"

(1)

The ttf-droid-sans-fallback package is particularly important as it includes broader character set support including Japanese characters (1).

Qt Configuration for Fonts

You also need to ensure proper font configuration support is enabled in Qt. Add this to your local.conf:

PACKAGECONFIG_FONTS:pn-qtbase = "fontconfig"

(1)

Additional Qt Packages

For PySide6 support, you may need to include additional Qt and Python packages. The documentation shows examples of Qt virtual keyboard with Chinese language support, which uses similar principles (1):

PACKAGECONFIG:append:pn-qtvirtualkeyboard = " lang-zh_CN"

(1)

For Japanese support, you would adapt this to include Japanese language packs if available.

Build Process

After making these configuration changes in your local.conf, rebuild your image (2):

$ bitbake tdx-reference-multimedia-image

(2)

Additional Considerations

  1. Locale Support: Ensure your system has proper locale support configured for Japanese text rendering
  2. Font Path: Verify that your Qt application can access the font files at runtime
  3. Character Encoding: Make sure your application handles UTF-8 encoding properly for Japanese characters

The Verdin AM62 platform supports Qt applications well, as demonstrated in the QtWayland deployment examples (1). The key is ensuring the proper font packages and Qt font configuration are included in your Yocto build.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi @raju3003!

Could you please test the approach suggested by the Toradex AI and check if it resolves your issue?

Best regards.

Hi lucas_az.tx,

Thanks it works

regards,
Raju