| Summary: | Font preview does not work well in a non-English environment | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Huanyu Liu <1293660441> |
| Component: | kcm_fontinst | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | kde, nate |
| Priority: | NOR | ||
| Version First Reported In: | 6.3.5 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Bad font preview | ||
|
Description
Huanyu Liu
2025-07-31 14:41:30 UTC
How would you suggest going about fixing this? Some big fonts do support latin and chinese. If we had a drop-down in the preview area to choose a language that only showed available options would that work? (In reply to David Edmundson from comment #1) > How would you suggest going about fixing this? Some big fonts do support > latin and chinese. > > If we had a drop-down in the preview area to choose a language that only > showed available options would that work? Ideally, kfontinst should be able to detect the supported languages automatically, but it is not easy to implement. If you open a font with FontForge, you will find the (declared) supported Unicode/Codepage ranges at "Font Info > OS/2 > Charsets". However, these two fields are arbitrarily editable, so it might be inaccurate. Furthermore, supported *languages* cannot be implied from supported *Unicode ranges*. For example, a font designed for French must support the "Latin-1 Supplement" Unicode range (or the "Latin-1" codepage), but may only support necessary letters for French, so it cannot be used for German, which also requires the "Latin-1 Supplement" Unicode range. We can make a rough guess based on supported Unicode/Codepage ranges, and put all possibly supported languages into a drop-down. In case of failure, the user should be given the freedom to select another language. This can be done by putting a "More languages..." at the end of the drop-down. This also requires that the preview text for all languages be extracted to a separate map that is always accessible, regardless of the current system language. A hand-written map from Unicode/Codepage ranges to possible supported languages is also required. If the language detection part is too difficult to implement, we can just stuff everything into the drop-down, and let the user make the choice. |