You are not logged in.

#1 2014-10-13 20:43:00

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

When does a font need xorg-fonts-encodings?

In several font packages I see the following dependencies:

depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')

fontconfig contains fc-cache and xorg-font-utils depends on mkfontscale and mkfontdir, which are all needed during install (e.g., see this install file (BTW, what do those "op=$1", "shift" and "$op $*" do?)).

But why is xorg-fonts-encodings needed? And when isn't it needed (for instance, otf-ipafont doesn't have it as a dependency (BTW2, why does that script install ttf files in /usr/share/fonts/OTF?))?

Offline

#2 2014-10-14 01:22:54

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: When does a font need xorg-fonts-encodings?

Marcel- wrote:

But why is xorg-fonts-encodings needed? And when isn't it needed (for instance, otf-ipafont doesn't have it as a dependency (BTW2, why does that script install ttf files in /usr/share/fonts/OTF?))?

man 1 mkfontdir gives a typically not-plain-English explanation of the use of encodings.  Essentially it's a mapping of Speedo, Type1, and TrueType fonts to the encodings used with XLFD names.  If an app calls for the font,-microsoft-candara-medium-r-normal--0-0-0-0-p-0-microsoft-cp1252, the fontserver will use the glyphs that match the encoding from Candara.ttf.

Perhaps the IPA fonts simply rely on utf-8 and not have any other encodings mapped.

OpenType technically includes TrueType fonts.  A brief explanation can be found at http://www.myfonts.com/info/opentype-flavors-ps-tt/.  PostScript Type1 outlines, otfs, are drawn using cubic beziers; TrueTypes, ttfs, use quadratic beziers.  Not something I worry about.

I have never run across programs where otfs and ttfs cannot be freely swapped. I've read that Apple, at one time, did use a ttf format that would not work on Windows.

You can use the file command to see what a fontfile has to say about itself:

$ file ipam.ttf 
ipam.ttf: TrueType font data
$ file Inconsolata.otf
Inconsolata.otf: OpenType font data

Edited to correct the fragmented sentences.

Last edited by thisoldman (2014-10-14 01:40:06)

Offline

#3 2014-10-14 14:54:44

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: When does a font need xorg-fonts-encodings?

thisoldman wrote:
Marcel- wrote:

BTW2, why does that script install ttf files in /usr/share/fonts/OTF?

OpenType technically includes TrueType fonts.  A brief explanation can be found at http://www.myfonts.com/info/opentype-flavors-ps-tt/.  PostScript Type1 outlines, otfs, are drawn using cubic beziers; TrueTypes, ttfs, use quadratic beziers.  Not something I worry about.

I have never run across programs where otfs and ttfs cannot be freely swapped. I've read that Apple, at one time, did use a ttf format that would not work on Windows.

That was not the point: we have a separate directory for TrueType fonts, namely /usr/share/fonts/TTF. Why does that script install ttf files in /usr/share/fonts/OTF?

Offline

Board footer

Powered by FluxBB