Sekai-World / sekai-viewer

Web Database Viewer of Project Sekai
https://sekai.best
GNU General Public License v3.0
328 stars 38 forks source link

[Feature request] Add language specific fonts #376

Closed C0NS03L closed 2 years ago

C0NS03L commented 2 years ago

Motivation. Personally, I don't like Thai fonts at the moment plainly because of how it looks. I think there are more fonts out there that are more attractive and look better. I think this is also the case with some other languages, so I think that it might be a good idea to add support for custom fonts set that change with the locale.

Suggested Implementation Basically allow developers to add a list of fonts to a certain language

defaultfont_th = `"Prompt","Roboto","Helvetica","Arial",sans-serif`;
defaultfont_en = `"Roboto","Helvetica","Arial",sans-serif`;
defaultfont = `"Roboto","Helvetica","Arial",sans-serif`;

like so, and when user selects that language, the fonts will change to fits the language.

FontSystem

**Ignore the translation changes, the screenshotted image is from my dev branch with a manual inspect element translation since I can't change language on my dev build

*** I do have a rough draft for this in my fork, however I think I should discuss about the changes before PR-ing

C0NS03L commented 2 years ago

379 Merged