Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions to mount fonts for Docker installation do not work #1194

Open
chunjiw opened this issue Nov 7, 2024 · 5 comments
Open

Instructions to mount fonts for Docker installation do not work #1194

chunjiw opened this issue Nov 7, 2024 · 5 comments

Comments

@chunjiw
Copy link

chunjiw commented Nov 7, 2024

I struggled for a long time following instructions in #1136; turns out it is wrong (at least to me):

  1. Mount a directory with font files to /user/local/share/fonts/custom does not work; I need to mount to /user/local/share/fonts
  2. woff2 files do not work, ttf files work.

More details here.

I can make a pull request once I got at least one other user confirming my experience.

Thanks!

@JPVenson
Copy link
Member

JPVenson commented Nov 7, 2024

/user/local/share/fonts/custom the custom part should always be your font you want to map, not "custom". You should never mount the whole folder as all fonts get send to the client at once and there is a limit of 20mb for fonts in browsers because those fontfiles will be stored in memory.

@chunjiw
Copy link
Author

chunjiw commented Nov 7, 2024

I see, thank you for the explanation!

Nevertheless, I think the doc needs improving because it says

Custom server-side system fonts directory can be optionally bind mounted...

So I naturally thought I should mount a directory.

@chunjiw
Copy link
Author

chunjiw commented Nov 7, 2024

Also in the original pull request #1136

Apparently it's enough to mount a custom font directory into for example /usr/local/share/fonts/custom (the custom part is arbitrary name, but the primary /usr/local/share/fonts folder shouldn't be mounted itself as it also has .uuid file there, so a subdir needs to be created.

I think the pull request author quite clearly means to mount directory to directory. But since that failed me, I believe you @JPVenson :)

@JPVenson
Copy link
Member

JPVenson commented Nov 7, 2024

sure you can create a folder and then move your custom fonts there and mount the directory instead, for as long as you dont get over the 20mb mark its fine. But yea you have to create the folder in the first place and mount it then with your custom fonts

@felix920506
Copy link
Member

No @JPVenson these don't get sent to the client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants