Skip to content

Conversation

jackkenney10
Copy link

@jackkenney10 jackkenney10 commented May 3, 2025

Description

Added support for fonts installed on host OS to be mounted in the anthias-viewer container, and for the font cache to be rebuilt at container startup. Users may install additional fonts in the host OS (such as font-noto-color-emoji), and they will be available for use by the Webviewer in the anthias-viewer container.

Syncing of fonts is achieved by mounting /usr/share/fonts to /usr/share/fonts in anthias-viewer. Rebuilding of the font cache at container startup is achieved by running fc-cache -f -v in entrypoint.sh, which has been made the entrypoint for the anthias-viewer container.

This will address issue #2272.

I made minimal changes to the Dockerfile to support host-mounted fonts and automatic fc-cache refresh at container startup. Tested successfully on Raspberry Pi. No core application logic was changed.

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

@jackkenney10 jackkenney10 requested a review from a team as a code owner May 3, 2025 15:36
Copy link
Contributor

@nicomiguelino nicomiguelino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jackkenney10, please let me take some time to test the changes across supported platforms (Raspberry Pi, x86).

@nicomiguelino
Copy link
Contributor

nicomiguelino commented May 4, 2025

@jackkenney10, please don't forget to include in the description that this PR will fix #2272.

Copy link
Contributor

@nicomiguelino nicomiguelino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes works well for the Raspberry Pi OS Lite or Debian version. However, users who installed the balenaOS version of Anthias have minimal to no control over the fonts, if they wish to install it.

It would be better if fonts like the Noto Color Emoji will be installed automatically, while still keeping the option to add fonts to the host /usr/share/fonts.

@jackkenney10
Copy link
Author

Nico,

Thank you for your review and feedback. I did not consider the case of users on balenaOS. I will investigate which fonts should be installed automatically, implement this, and update the branch with the change.

Thank you! :)

…ontainer in tools/image_builder/utils.py to automatically install emoji font in the anthias-viewer container
…viewer container in tools/image_builder/utils.py to automatically install emoji font in the anthias-viewer container"

This reverts commit fa0f2b5.
…ontainer in tools/image_builder/utils.py to automatically install emoji font in the anthias-viewer container
…ontainer in tools/image_builder/utils.py to automatically install emoji font in the anthias-viewer container
…e to a conflict with host-mounted font support. Need to find another approach.
Copy link

@jackkenney10
Copy link
Author

Nico,

I'm still working on this. I'm trying to find an approach that allows both host-mounted font support, as well as an automatic install of fonts in the viewer container during build. There is nothing new to review yet. Hopefully I can figure this out soon.

@nicomiguelino
Copy link
Contributor

Hi @jackkenney10, just checking in on this PR — do you have an update? We'd love to get this moving again. Let me know if there's anything I can do to help.

@jvendryes
Copy link

Just checking in to see if there are any updates to this PR? Would be useful for me as well.

@jackkenney10
Copy link
Author

Team, I let this one slip off my radar after I got it working on my one pi. I apologize. I'll be out of town and unable to work on this until next weekend, but I'll take another look when I'm back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants