First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 40808
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Fonts Team <fonts@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Craig Lawson <craig.lawson@alum.mit.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
corefonts.r2.patch Patches corefonts-1-r1.ebuild patch Craig Lawson 2004-02-08 00:52 0000 338 bytes Details | Diff
freefonts.r3.patch Patches freefonts-0.10-r2.ebuild patch Craig Lawson 2004-02-08 00:54 0000 849 bytes Details | Diff
urw-fonts.r2.patch Patches urw-fonts-2.0-r1.ebuild patch Craig Lawson 2004-02-08 00:56 0000 1.14 KB Details | Diff
portage.py.patch Patches env-update patch Craig Lawson 2004-02-08 00:58 0000 604 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 40808 depends on: Show dependency tree
Show dependency graph
Bug 40808 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-08 00:47 0000
Ghostscript relies on the GS_FONTPATH environment variable to locate its fonts.
However, some font packages (perhaps most) do not configure GS_FONTPATH and so
installed fonts are not found by ghostscript without manual configuration by
the user.

The attached patches configure GS_FONTPATH for three font packages:
  media-fonts/corefonts
  media-fonts/freefonts
  media-fonts/urw-fonts

(I don't have anything against the other font packages. It's just that these
are the ones I currently use.)

Additionally, a patch is required to env-update in
/usr/lib/portage/pym/portage.py to recognize GS_FONTPATH as a "special" that
may accumulate colon-separated paths. (Without env-update patched, GS_FONTPATH
will merely take the last assigned value.)

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Craig Lawson 2004-02-08 00:52:32 0000 -------
Created an attachment (id=25165) [edit]
Patches corefonts-1-r1.ebuild

Patches corefonts-1-r1.ebuild to assign GS_FONTPATH in
/etc/env.d/40gs-corefonts

------- Comment #2 From Craig Lawson 2004-02-08 00:54:35 0000 -------
Created an attachment (id=25166) [edit]
Patches freefonts-0.10-r2.ebuild

Patches freefonts-0.10-r2.ebuild to assign GS_FONTPATH in
/etc/env.d/40gs-freefonts

------- Comment #3 From Craig Lawson 2004-02-08 00:56:14 0000 -------
Created an attachment (id=25167) [edit]
Patches urw-fonts-2.0-r1.ebuild

Patches urw-fonts-2.0-r1.ebuild to assign GS_FONTPATH in
/etc/env.d/40gs-urw-fonts

------- Comment #4 From Craig Lawson 2004-02-08 00:58:18 0000 -------
Created an attachment (id=25168) [edit]
Patches env-update

Patches env-update in /usr/lib/portage/pym/portage.py by adding GS_FONTPATH to
the list of "special" environment variables which accumulate colon separated
paths.

------- Comment #5 From Donnie Berkholz 2004-02-08 11:54:14 0000 -------
Ghostscript apparently isn't smart enough to use fontconfig?

------- Comment #6 From Craig Lawson 2004-02-08 20:20:26 0000 -------
Apparently.

I'm no expert on either, but I did find mention in the FontConfig newsgroup as to the reason: the information FontConfig caches and provides does not include the font's PostScript name. Refer to http://www.xfree86.org/pipermail/forum/2003-April/001114.html

Now that you mention it, it would be nice if ghostscript used FontConfig. CUPS and OpenOffice, too. I'm using an inkjet printer with no built-in fonts, and it would simplify matters if OO, CUPS, and Ghostscript all agreed on which fonts I have built into my system.

I'm dreaming. I used to use a Mac. But maybe FontConfig could get us there.

------- Comment #7 From assamite@web.de 2004-02-25 00:49:48 0000 -------
A solution that I've found after some hours of searching is adding the
FontConfig path (/etc/fonts) to the environment variable GS_LIB.
Now ghostscript seems to work together with fontconfig (although I'm 
no expert in these things) and recognizes fonts in the 
Fontmap file.

------- Comment #8 From Craig Lawson 2004-03-05 15:10:57 0000 -------
The fix suggested in Comment #7 did not work for me.

This is what I did. Please tell me if I missed something.

$ unset GS_FONTPATH
$ export GS_LIB=/etc/fonts
$ cd /usr/share/ghostscript/7.07/lib
$ gs prfont.ps
GS>/Becker DoFont
  ("Becker" is a Type 1 font in /usr/share/fonts/freefont)

Result:
Can't find (or can't open) font file /usr/share/ghostscript/fonts/Becker.
Can't find (or can't open) font file Becker.
Substituting font Courier for Becker.

Ghostscript then displays the character map for Courier.


With /usr/share/fonts/freefont added to GS_FONTPATH, the prfont script correctly displays the character map for the Becker font.

I am using app-text/ghostscript-7.07.1-r1, compiled with USE Flags: X cups -cjk

------- Comment #9 From Dylan Carlson (RETIRED) 2004-06-25 09:40:10 0000 -------
Redhat patched ESP ghostscript 7.0.7 for fontconfig.  Take a look at:
http://cvs.sourceforge.net/viewcvs.py/kde-redhat/fedora/SOURCES/ghostscript-7.07-fontconfig-rh-2.patch?rev=1.3&view=auto

...I had to switch to AFPL because ESP was crashing during pstopdf conversions.  But I'm having the font problem as well.

------- Comment #10 From Heinrich Wendel (RETIRED) 2004-08-04 09:00:55 0000 -------
added the redhat patch to ghostscript-7.07.1-r4

------- Comment #11 From foser (RETIRED) 2004-08-09 03:42:47 0000 -------
you also need to add a pkgcongfig buildtime dep

I wonder why this is behind a truetype useflag btw ?

------- Comment #12 From Heinrich Wendel (RETIRED) 2004-08-09 04:28:55 0000 -------
added the pkgconfig dep. i used the truetype useflag because that's what
fontconfig does, adds support for truetype fonts, doesn't it?

(next time please reopen the bug)

------- Comment #13 From foser (RETIRED) 2004-08-09 05:31:32 0000 -------
not really, fontconfig is just a way to easily select/handle fonts & it happens
to depend on freetype which supports a whole range of font formats (not just
ttf). In practice i believe this patch -if used- should be applied
unconditionally to the ebuild, this would be better for the overall consistenty
of how gentoo handles fonts (that is what comment #5 was about).

The ghostscript fonts should also be moved to the /usr/share/fonts location
eventually.

------- Comment #14 From Heinrich Wendel (RETIRED) 2004-08-11 01:15:56 0000 -------
i added a new revision that applies the fontconfig patch by default and moves
the fonts to /usr/share/fonts/ghostscript

First Last Prev Next    No search results available      Search page      Enter new bug