https://bugs.kde.org/show_bug.cgi?id=507697

--- Comment #2 from Huanyu Liu <[email protected]> ---
(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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to