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

font: wrong language is used for sample text #64

Closed
changwoo opened this issue Jul 25, 2018 · 2 comments
Closed

font: wrong language is used for sample text #64

changwoo opened this issue Jul 25, 2018 · 2 comments

Comments

@changwoo
Copy link

I found with Korean fonts, "bg" seems to be chosen as the language for sample text. I think it's because "bg" is alphabetically first in the supported language list.

$ fc-query /usr/share/fonts/truetype/baekmuk/batang.ttf |grep lang
	familylang: "en"(s)
	stylelang: "en"(s)
	fullnamelang: "en"(s)
	lang: bg|fj|ho|ia|ie|io|ko|kum|nr|om|os|ru|sel|so|ss|st|sw|ts|uz|xh|zu|kj|kwm|lg|ms|ng|rn|rw|sn|za(s)
$ 

Fonts don't seem to have information to finding out their representitive language. So how about just putting language for sample text in metainfo file?

@ximion
Copy link
Owner

ximion commented Jul 25, 2018

Yeah, font metadata is hard.
What you can do at the moment is use two custom values to set the exact text and icon to be used, this is primarily used for symbolic fonts though:

<custom>
  <value key="FontIconText">∑√</value>
  <value key="FontSampleText">∑ ∮ √ ‖...‖ ⊕ 𝔼 ℕ ⋉</value>
</custom>

To explicitly set the supported languages for a font, you should be able to use <languages/> in your font metainfo file, see https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html#tag-ct-languages for details.
That support isn't implemented yet however, maybe I will be able to work on that this week (as always though, patches welcome!).

@ximion ximion closed this as completed in faa757e Jul 25, 2018
@ximion
Copy link
Owner

ximion commented Jul 25, 2018

I've committed a preliminary patch that deals with this issue. I have an idea for a slightly better version though, which will be added later.
Greetings from Debconf! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants