[AppStream] Local font names in fonts metadata
Changwoo Ryu
cwryu at debian.org
Sun Oct 28 06:44:53 UTC 2018
Thanks for the reply.
2018년 10월 16일 (화) 오후 11:37, Matthias Klumpp <matthias at tenstral.net>님이 작성:
>
> Hello!
> Sorry for the delayed reply, when the mail arrived I was at Debconf
> Taiwan and afterwards it was buried under a large pile of other mail
> and somehow wasn't flagged as important by my filter...
>
> Am Fr., 29. Juni 2018 um 06:12 Uhr schrieb Changwoo Ryu <cwryu at debian.org>:
> > Hello,
> > On reading AppStream specification "Fonts" section,
> >
> > > You should add one or more children of type <font/> to make the
> > > font's full-names known. The full-name should be the same as
> > > given in the font file for the English language. If no
> > > full-name is set, a space-separated combination of the font's
> > > family and style is used instead. The font must have a family
> > > defined to be included.
> >
> > It clearly states <font/> should be "full-names for the English
> > language". But some fonts have local names and people usually specify
> > those fonts using the local names. I think non-English names should be
> > also added.
>
> No, because the `<font/>` tag is actually a kind of API. It is used by
> software to know which font faces are in the component, so that for
> example an application can download missing fonts automatically and so
> we can render sample texts for fonts easier.
> For localization, the font component already has a localizable <name/>
> as well as <description/>.
Exactly I mean the API. Softwares sometimes use that local name to
refer the missing font.
> > For example, Korean fonts usually have multiple English and Korean
> > names. Korean web pages often specify their CSS font-family in Korean
> > font name. And if I write an ODF document specifying a Korean font in
> > Korean locale, then the document has the Korean version of font family
> > name, not English one.
>
> Will only the Korean name be saved, or how is the font referenced, technically?
> Having a font be referred to by two names in code would indeed by a
> tricky issue to solve...
Yes, the only Korean one is saved. The font can be actually refered by
two names. It may look strange but having multiple famly names for
english and local (mostly transliteration) is very common in CJK
fonts.
> > In addition, I think "fullname" should not be preferred to "family".
> >
> > > $ fc-query /usr/share/fonts/truetype/nanum/NanumGothicBold.ttf
> > > Pattern has 23 elts (size 32)
> > > family: "나눔고딕"(s) "NanumGothic"(s)
> > > familylang: "ko"(s) "en"(s)
> > > style: "Bold"(s)
> > > stylelang: "ko"(s)
> > > fullname: "NanumGothicBold"(s)
> > > fullnamelang: "en"(s)
> >
> > Like the above, some fonts only have English "fullname" but multiple
> > "family" names including local one.
> >
> > Opinions?
>
> The `<font/>` tag should contain a name that software is able to refer
> to, and usually refers to, in code. Maybe the specification wording
> can be changed in that direction?
> Since I am not an expert on fonts, I am open to suggestions and
> explanations here.
Softwares use family and style to refer a font. AFAIK in
TrueType/OpenType context, fullname component is just for display
purpose, not for software use. In most cases concatenation of family
and style is fullname, but sometimes it is not. So I believe
family+style should be used instead of fullname.
More information about the AppStream
mailing list