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

Non-Latin fonts for the UI #13200

Open
nijel opened this issue Dec 5, 2024 · 9 comments
Open

Non-Latin fonts for the UI #13200

nijel opened this issue Dec 5, 2024 · 9 comments
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.

Comments

@nijel
Copy link
Member

nijel commented Dec 5, 2024

Describe the problem

Weblate currently bundles Source Sans / Source Code fonts which cover Latin script only. Any other scripts will fall back to the browser fonts. The assumption is that the user has fonts for the languages they are translating.

This might bring some issues, though:

  • The system fonts might not look as good as third-party ones for some scripts.
  • Users without these fonts will not see these texts rendered (for example, when looking at translations in other languages than you translate).

Describe the solution you would like

The solution needs to be decided:

  • Should Weblate ship additional fonts? The size of Weblate package could grow considerably when adding a few fonts.
  • Which scripts to cover? We probably can't cover all the scripts.
  • Weblate already ships Kurinto font which is used when rendering PNG widgets. Maybe we could use this in the UI?

Describe alternatives you have considered

The current approach works well for most of the time and could be kept.

Screenshots

No response

Additional context

This issue is to get opinions about this topic. Please share your thoughts.

@Geeyun-JY3 @BoFFire @yarons @meel-hd

@nijel nijel added enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship. labels Dec 5, 2024
@meel-hd
Copy link
Contributor

meel-hd commented Dec 5, 2024

Should Weblate ship additional fonts? The size of Weblate package could grow considerably when adding a few fonts.

Given that we already ship the font kurnito, the size isn't an issue if we ended up using it also in the UI. Also if we decided to ditch source-code-pro and code-sans the size could even decrease. Assuming we use these two fonts for their look, because font-kurnito has many different typefaces we can use instead.

Which scripts to cover? We probably can't cover all the scripts.

In theory if users face troubles with other scripts not visible we should have a solution or additional guides in docs. However I don't think that's an issue.

Note that kurnito is designed to support many writing scripts, more than source-code-pro.

Copy link

github-actions bot commented Dec 5, 2024

This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate.

Please try to clarify the use case or consider proposing something more generic to make it useful to more users.

@nijel
Copy link
Member Author

nijel commented Dec 5, 2024

The Source Sans will stay because it's the font used by Weblate for branding purposes.

@yarons
Copy link
Contributor

yarons commented Dec 7, 2024

The font used on the Libreoffice weblate is pretty convenient but I think there are some Niqqud issues.

Alef is both beautiful and has no compatibility issues.

The OS default is usually pretty good, there used to be some open source mono font that was pretty annoying but I can't find it so it was probably fixed.

@nijel
Copy link
Member Author

nijel commented Dec 9, 2024

@yarons LibreOffice Weblate doesn't seem to have any customization in this (they have font-family: "Source Sans 3",sans-serif;). So it should use the system font for Arabic script.

@yarons
Copy link
Contributor

yarons commented Dec 9, 2024

@nijel So I assume it's Hebrew only.

@nijel
Copy link
Member Author

nijel commented Dec 9, 2024

Yes, Hebrew has a custom font there:

div[lang="he"],
textarea[lang="he"],
span[lang="he"] {
  font-family:'Assistant','Source Sans Pro',sans-serif
}

@nijel
Copy link
Member Author

nijel commented Dec 9, 2024

Assistant is a Hebrew extension to Source Sans, see https://github.com/hafontia-zz/Assistant

Adobe has some language variants as well: https://github.com/orgs/adobe-fonts/repositories?language=&q=source+sans&sort=&type=all

Using these for UI consistency would be probably great, the question is if it is worth of the additional megabytes.

PS: I just realized that the npm package for Source Sans (https://yarnpkg.com/package?q=source%20sans&name=source-sans) is few years behind as well...

@yarons
Copy link
Contributor

yarons commented Dec 9, 2024

I'm pretty sure it's unnecessary, maybe adding that as additional best practice externally so if the user will want it there will be a way to download packages for air-gapped platforms or download for internet connected machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.
Projects
None yet
Development

No branches or pull requests

3 participants