-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add fonts to support more different types of characters for multiple languages #29861
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0291176
fix: add fonts to support more different types of characters for mult…
lucasfcosta 377ab26
fix: add fonts to support more different types of characters for mult…
lucasfcosta ea0dcfe
Prefer noto fonts
andrewvc 6ee5938
Merge remote-tracking branch 'lucas/install-fonts' into install-fonts
andrewvc 10096cb
fix: add fonts to support more different types of characters for mult…
lucasfcosta 644a0fc
fix: add fonts to support more different types of characters for mult…
lucasfcosta 1518c19
Prefer noto fonts
andrewvc 44327ff
Remove redundant font install
andrewvc f1c91ff
Merge branch 'install-fonts' of github.com:lucasfcosta/beats into ins…
andrewvc 668449d
Remove redundant font install
andrewvc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curios about the list we arrived at here, We don't even have the basic one
fonts-liberation
for the image.Do we know if that works?
Here is the list from PW for comparison - https://github.com/microsoft/playwright/blob/5ba7903ba098586a13745e0d7ac894f1d55d47aa/packages/playwright-core/src/utils/nativeDeps.ts#L434-L470
One we use in RUM agent for puppeteer and playwright - https://github.com/elastic/apm-agent-rum-js/tree/master/.ci/docker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I followed an approach of testing websites and taking note of which didn't display all characters correctly. Then, I went after the packages only for those, and ran an E2E test which generated the images above. I followed this process to avoid adding too many unnecessary packages.
Wrt to fonts-liberation, it seemed to be a standard set of fonts which could just replace the default set of fonts to which it's compatible, but we already have default fonts for western characters in the base image and thus I thought we wouldn't need that. Looking into the other packages, they also seem to fall into one of two categories:
fonts-liberation
orttf-unifont
)libfontconfig
)The other fonts seemed to be the most complete and popular fonts for their character standards (
fonts-arphic-ukai
[for chinese characters] ,fonts-ipafont-mincho
[for japanese characters,fonts-ipafont-gothic
being for sans-serif japanese characters], andfonts-unfonts-core
for Korean characters). Those were the ones which came up when I looked for packages for each individual language.We already had support for Arabic/Russian characters in the base image as per the initial test, so I haven't added those as the websites I visited already displayed correctly. It could be the case that there are characters outside the unicode space
Looking at Playwright's deps these are the changes I see we could make:
fonts-wqy-zenhei
this seems like a more complete font set to replace the one in the package we have. However, I was just thinking about the licensing of these given that this package seems to be GPL licensed and therefore I don't know whether we could include it in the image we distribute. The Arphic Public License for the current fonts seem to only apply for modification of the fonts themselves and is incompatible with GPL and thus seems fine, but actually it would be good to review.➡️ @andrewvc @vigneshshanmugam do we have a particular specialist in software licensing to review these?
fonts-tlwg
seems to support Thai characters, so that's one I think we could add. However, it also includes GPL licensed fonts, so we must double check that.fonts-noto-color-emoji
] for supporting Google's emoji set (which should really follow the same set as the standard, shouldn't it?)I moved this PR to
draft
just so that we would make sure to review the licensing and whether we're happy with the current coverage set. I do thing we should addfonts-tlwg
though, so I'll run a test for that before opening this PR for review again too.