LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.0 64-bit Problem with Ghostview (gv) and Fonts (http://www.linuxquestions.org/questions/slackware-14/slackware-14-0-64-bit-problem-with-ghostview-gv-and-fonts-4175444668/)

tronayne 01-08-2013 10:31 AM

Slackware 14.0 64-bit Problem with Ghostview (gv) and Fonts
 
I'm getting strange (at least to me) error messages using
Code:

gv filename.ps
Any PostScript file I've attempted this with spits out
Quote:

Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,*" to type FontSet
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Huh?

Something I've missed somewhere?

I do have the Adobe Type Library installed (in /usr/local/share/fonts/Adobe) -- it's all PostScript -- along with other local font directories in /usr/local/share/fonts/[names] with the local.conf file in /etc/fonts (been working for years, those).

Plus I have
Code:

/var/log/packages/fontforge-20120731_b-x86_64-1_SBo
/var/log/packages/font-adobe-utopia-type1-1.0.4-noarch-1
/var/log/packages/font-bh-lucidatypewriter-100dpi-1.0.3-noarch-1
/var/log/packages/font-bh-lucidatypewriter-75dpi-1.0.3-noarch-1
/var/log/packages/font-bh-type1-1.0.3-noarch-1
/var/log/packages/font-bitstream-type1-1.0.3-noarch-1
/var/log/packages/font-ibm-type1-1.0.3-noarch-1
/var/log/packages/font-xfree86-type1-1.0.4-noarch-1
/var/log/packages/freetype-2.4.10-x86_64-1

Any ideas?

business_kid 01-08-2013 10:57 AM

What's in /usr/share/ghostscript/fonts/?

On my box, it's a link to /usr/share/fonts/Type1

tronayne 01-08-2013 11:12 AM

Code:

ls /usr/share/ghostscript
9.05/  fonts@
ls -l /usr/share/ghostscript/fonts
lrwxrwxrwx 1 root root 22 Oct 18 12:19 /usr/share/ghostscript/fonts -> /usr/share/fonts/Type1/

And the fonts.dir and fonts.scale files are there.

Tiz a puzzlement

business_kid 01-09-2013 03:40 AM

Is there a fonts.dir, fonts.scale & font.alias? If not, it doesn't see the fonts. cd to the directory and as root do
mkfontdir
mkfontscale

From the mkfontdir man page
Quote:

The file "fonts.alias", which can be put in any directory of the font-path, is used to map new names to existing fonts, and should be edited by hand. The format is two white-space separated columns, the first containing aliases and the second containing font-name patterns. Lines beginning with "!" are comment lines and are ignored.

tronayne 01-09-2013 10:39 AM

Apparently, this goes back quite a ways (google gv missing font problem).

From July 2010: http://old.nabble.com/font-issues-td29164490.html -- the answer was libXt.patch, but it was for 1.0.7, not for 1.1.3 as in Slackware 14.0. Oh, phooey.

OK, so look at another one, from September 2010: https://bugzilla.redhat.com/show_bug.cgi?id=634039. Lots of discussion about exactly the same problem (but Fedora-specific). There is one suggestion,
Quote:

Edward Sheldrake 2010-10-26 09:55:12 EDT

I don't think even the encodings in /usr/share/X11/fonts/encodings are read without the encodings.dir file, e.g. from my Xorg.0.log

FreeType: couldn't find encoding 'iso8859-13' for '/usr/share/fonts/sazanami/mincho/sazanami-mincho.ttf'

iso8859-13 is:
/usr/share/X11/fonts/encodings/iso8859-13.enc.gz

It is possible for encodings.dir to list the contents of multiple directories:
# cd /usr/share/X11/fonts/encodings
# mkfontdir -n -e /usr/share/X11/fonts/encodings -e /usr/share/X11/fonts/encodings/large
Of course, it's Fedora and it's from 2010 (so there's no /usr/share/X11/fonts/encodings directory in Slackware 14, but there are /usr/share/fonts/encodings and /usr/share/fonts/encodings/large, seemingly with the same content).

Subsequently, there is this post (referring to the above one):
Quote:

Roderick Johnstone 2010-10-26 11:24:28 EDT

Edward: Very many thanks.

The problem was in one of our local font directories. Your mkfontdir command in bug #634039 fixed it nicely.

Closing this report.
So, maybe that worked OK in 2010 but I'm reluctant to touch the font directories (might no hurt, but, boy do I not want to screw things up not knowing what I'm doing).

I'm going to keep digging -- it certainly is strange that the identical errors occur in Slackware 14 that were appearing years ago, eh?

business_kid 01-10-2013 04:19 AM

Not really strange that the same error happened in the past, with similar consequences.

If you find a solution (in this case, running mkfontdir like I already suggested) check for it or do it. Otherwise, ignore the past. Have you fonts.dir wuith a line for each of your fonts?

tronayne 01-10-2013 08:30 AM

Both fonts.dir and fonts.scale contain 593 indexes for the font files found in /usr/share/ghostscript/fonts (which is actually a symbolic link to /usr/share/fonts/Type1).

I have a 13.37 box (gv, ghostscript and ghostscript-fonts are the same versions on 13.37 and 14.0 and I'm doing compares to find any differences. None have turned up as yet.

business_kid 01-11-2013 03:07 AM

try /etc/fonts/*.conf. IIRC, fonts.conf should be left alone, but you can add local.conf with any additions

tronayne 01-11-2013 09:07 AM

OK, finally got a little bit schmarter; a Google search for "Missing charsets in String to FontSet conversion" turned up the answer at http://www-01.ibm.com/support/docvie...id=swg21146408 -- it's the locale, stupid.

You know those warnings about UTF-8 in /etc/profile.d/lang.sh? Well, they're true -- you're going to get the messages from gv with a UTF-8 locale but if you put it back to LANG=en_US you don't.

Dammit.


All times are GMT -5. The time now is 01:58 AM.