Bug#313067: defoma: Defoma prevents ghostscript from rendering fonts properly

2005-08-28 Thread Angus Lees
At Sun, 28 Aug 2005 08:42:30 -0400, Kirill wrote:
> > Having the letter spacing wrong probably means the original kword app
> > somehow didn't get the font metric information correct, however.  Has
> > this ever worked for you in the past?
> 
> Not with Times New Roman. But if after editing gsfonts.hints (file
> attached) I select NimbusRoman, it displays and prints just fine.
> 
> I edited msttcorefonts.hints as well (file attached), which helped
> solve some of the substitution problems, but not the spacing problem
> with Times New Roman in KWord.

Hrm.  I wonder why Kword has a different set of metrics for Times.  Is
this the (postscript standard) "Times-Roman" or microsoft's
"Times-New-Roman" font you were testing against here?

(Your original report had Times being correctly replaced by Nimbus
Roman but produced with the wrong metrics.  Here you mention Times New
Roman - a different font in the eyes of Defoma/postscript/fontconfig)

> > Hrm.  ghostscript (via Defoma and gsfonts.hints) only knows this font
> > as "NimbusRomNo9L-ReguItal".  Where did kword get the name
> > "NimbusRomanNo9L-Italic" from?
> 
> It seems these names are somehow related to fontconfig font names.
> Output of fc-list also attached.

The GUI drop down widget-thing you select the fonts from almost
certainly comes from fontconfig.  I hope the KDE printing stuff is
doing something better than just removing whitespace from the
fontconfig names and hoping that makes a valid postscript FontName.

> Looks like at least the KDE printing component thinks that what it
> outputs are valid aliases for the existing fonts. I have no idea
> how it comes up with them. But no embedding should take place here.

So how do you print to a remote CUPS printer spooler for example,
where Arial (or whatever) simply may not be available?  The KDE
printing component really should be embedding the font data in the
generated postscript.

> You won't be able to blame the substitution problem on KWord alone,
> since other programs give the same results (Konqueror and so on).

I expect Kword's print output is generated via some common KDE
component, so all KDE print output would suffer the same problem.  Try
comparing against another fontconfig-using-but-not-KDE app like
mozilla or some gnome program.

-- 
 - Gus


pgp7Ivf0vDeKL.pgp
Description: PGP signature


Bug#313067: defoma: Defoma prevents ghostscript from rendering fonts properly

2005-08-28 Thread Kirill
> Hrm.  I wonder why Kword has a different set of metrics for Times.  Is
> this the (postscript standard) "Times-Roman" or microsoft's
> "Times-New-Roman" font you were testing against here?

It's msttcorefonts stuff, via fontconfig.

> (Your original report had Times being correctly replaced by Nimbus
> Roman but produced with the wrong metrics.  Here you mention Times New
> Roman - a different font in the eyes of Defoma/postscript/fontconfig)

What I actually tried to use was Times New Roman, however it somehow
got substituted with Times in the resulting postscript file. No clue
why.

> > Looks like at least the KDE printing component thinks that what it
> > outputs are valid aliases for the existing fonts. I have no idea
> > how it comes up with them. But no embedding should take place here.
> 
> So how do you print to a remote CUPS printer spooler for example,
> where Arial (or whatever) simply may not be available?  The KDE
> printing component really should be embedding the font data in the
> generated postscript.

Again I really have no idea how KDEPrint (I think that's what it's
called), CUPS and fontconfig are supposed to work together.

> I expect Kword's print output is generated via some common KDE
> component, so all KDE print output would suffer the same problem.  Try
> comparing against another fontconfig-using-but-not-KDE app like
> mozilla or some gnome program.

I may do that when I get time, but like I said the real question
is whether other people see this problem. If anyone else is using a
similar setup, they can test both KDE and non-KDE fontconfig programs
and see what they get.

Also I really wish there was any kind of document describing how
defoma, fontconfig, ghostscript, CUPS, KDEPrint, and so on are meant
to work together. Or are they?..

--
Kirill


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#313067: defoma: Defoma prevents ghostscript from rendering fonts properly

2005-08-28 Thread Angus Lees
At Sat, 11 Jun 2005 12:14:17 -0400, Kirill wrote:
> I am trying to set up an HPLJ 1012 to print from KDE apps (KWord, Konqueror)
> using CUPS. I am getting most fonts messed up by ghostscript (gs-esp). I've
> been struggling with it for a whole week now with very little progress so far.

> When I print to a PostScript file and then try to view it with ghostscript,
> almost all fonts are totally messed up, both the typeface and letter spacing
> is bad. Same with print preview and on paper.
> 
> Printing with Times New Roman in regular, italic, bold and bold italic and 
> then
> looking in the .ps file I see:
> 
> %%DocumentFonts: Times-Bold Times-Italic Times-Roman Times-BoldItalic
> 
> Then I run gs on it, and it says:
> 
> ESP Ghostscript 7.07 (2003-07-12)
> Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> Loading NimbusRomNo9L-MediItal font from 
> /var/lib/defoma/gs.d/dirs/fonts/n021024l.pfb... 2149928 764523 1763096 439747 
> 0 done.
> Loading NimbusRomNo9L-ReguItal font from 
> /var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2307264 878740 1763096 385118 
> 0 done.
> Loading NimbusRomNo9L-Medi font from 
> /var/lib/defoma/gs.d/dirs/fonts/n021004l.pfb... 2444504 1012113 1783192 
> 401765 0 done.
> Loading NimbusRomNo9L-Regu font from 
> /var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2581744 1137566 1783192 
> 387726 0 done.
> >>showpage, press  to continue<<
> 
> Result: it shows the page with Nimbus Roman instead of Times New Roman, and
> all letter spacing is fubared.

URW Nimbus Roman is supposed to be metric-compatible with Adobe's
Times New Roman, so this substitution is exactly what is supposed to
happen.  (I'm assuming here that you haven't gone out and bought the
real Adobe fonts)

Having the letter spacing wrong probably means the original kword app
somehow didn't get the font metric information correct, however.  Has
this ever worked for you in the past?  My only experience with kword
was many years ago and I too was appalled at the print quality
although I never investigated it.

> When I format all text with Nimbus Roman, I get:
> 
> %%DocumentFonts: NimbusRomanNo9L-Bold NimbusRomanNo9L-Italic NimbusRomanNo9L 
> NimbusRomanNo9L-BoldItalic
> 
> in the .ps file, and then
> 
> ESP Ghostscript 7.07 (2003-07-12)
> Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> Can't find (or can't open) font file 
> /usr/share/ghostscript/fonts/NimbusRomanNo9L-Italic.
> Can't find (or can't open) font file NimbusRomanNo9L-Italic.
> Substituting font Times-Italic for NimbusRomanNo9L-Italic.
> Loading NimbusRomNo9L-ReguItal font from 
> /var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2170024 782484 1763096 440505 
> 0 done.
> Loading NimbusSanL-ReguItal font from 
> /var/lib/defoma/gs.d/dirs/fonts/n019023l.pfb... 2267072 876716 1763096 445071 
> 0 done.
[...]
> 
> and everything shows up in Nimbus Sans.

Hrm.  ghostscript (via Defoma and gsfonts.hints) only knows this font
as "NimbusRomNo9L-ReguItal".  Where did kword get the name
"NimbusRomanNo9L-Italic" from?

Since Nimbus Roman isn't one of the base postcript fonts, Kword (or
whatever KDE component created the postscript) should have embedded
the font in the produced postscript file and ghostscript would not
have had to look for the font data itself.  Have you by any chance
turned some font embedding option off?  (I'd be extremely surprised if
it was off by default)

> Bold, italic and bold italic are shown fine, but normal Georgia it
> can't find because in defoma aliases it's known as Georgia-Regular
> rather than Georgia.
[similar with other font families]

It seems that kword is working off a totally different list of font
names than ghostscript.  This would be just fine if kword embedded the
font data in the postscript output, but it isn't and its expecting
ghostscript to be able to find the font data under the same font names
its using.

Since I don't have kword installed anywhere (and don't really want to
lug in all of KDE just to have a look), I'm CCing this to the kword
maintainer.  Ben, how does kword find font information when producing
postscript?  At the moment, it looks like Defoma (and ghostscript) are
doing the right thing and I'm thinking of reassigning this bug to
kword.


Kirill, As a temporary workaround, you could manually edit
/etc/defoma/hints/gsfonts.hints, etc and add the aliases that Kword is
assuming exist.  Just run "defoma-font reregister-all $hintfile" after
editing a hintfile for defoma to act on your changes.

-- 
 - Gus


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#313067: defoma: Defoma prevents ghostscript from rendering fonts properly

2005-08-26 Thread Steve Langasek
Hey all,

So what's the word on this bug?  Is it certain that it's an issue with
font packages?  If so, should it be cloned and reassigned to the font 
packages in question (hopefully with some hints as to how to fix)?

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#313067: defoma: Defoma prevents ghostscript from rendering fonts properly

2005-06-11 Thread Kirill
Package: defoma
Version: 0.11.8-0.1
Severity: grave
Justification: renders package unusable


I am trying to set up an HPLJ 1012 to print from KDE apps (KWord, Konqueror)
using CUPS. I am getting most fonts messed up by ghostscript (gs-esp). I've
been struggling with it for a whole week now with very little progress so far.
I have very hard time believing that I'm the only one experiencing this, yet
extensive Google searches turned up almost nothing. So before I start messing
with aliases in defoma hints, I'd like to see if anyone can help.

# dpkg -l '*cups*' '*foomatic*' '*ijs*' '*fonts*' 'gs-*' '*defoma*' | grep ii
ii  cupsys 1.1.23-10  Common UNIX Printing System(tm) - server
ii  cupsys-bsd 1.1.23-10  Common UNIX Printing System(tm) - BSD comman
ii  cupsys-client  1.1.23-10  Common UNIX Printing System(tm) - client pro
ii  libcupsimage2  1.1.23-10  Common UNIX Printing System(tm) - image libs
ii  libcupsys2-dev 1.1.23-10  Common UNIX Printing System(tm) - developmen
ii  libcupsys2-gnu 1.1.23-10  Common UNIX Printing System(tm) - libs
ii  foomatic-filte 3.0.2-20050403 linuxprinting.org printer support - filters
ii  hpijs  2.1.3+0.9.3-1  HP Linux Printing and Imaging - gs IJS drive
ii  gsfonts8.14+v8.11+urw Fonts for the Ghostscript interpreter(s)
ii  latex-xft-font 0.1-5  Xft-compatible versions of some LaTeX fonts
ii  mplayer-fonts  3.5-2  Fonts for mplayer
ii  msttcorefonts  1.2Installer for Microsoft TrueType core fonts
ii  xfonts-base4.3.0.dfsg.1-1 standard fonts for X
ii  gs-common  0.3.7  Common files for different Ghostscript relea
ii  gs-esp 7.07.1-9   The Ghostscript PostScript interpreter - ESP
ii  defoma 0.11.8-0.1 Debian Font Manager -- automatic font config

The system is the latest x386 sid, originally installed back in 2001 from
a woody prerelease CD. All fonts are displayed just fine on screen in KDE.

When I print to a PostScript file and then try to view it with ghostscript,
almost all fonts are totally messed up, both the typeface and letter spacing
is bad. Same with print preview and on paper.

Printing with Times New Roman in regular, italic, bold and bold italic and then
looking in the .ps file I see:

%%DocumentFonts: Times-Bold Times-Italic Times-Roman Times-BoldItalic

Then I run gs on it, and it says:

ESP Ghostscript 7.07 (2003-07-12)
Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-MediItal font from 
/var/lib/defoma/gs.d/dirs/fonts/n021024l.pfb... 2149928 764523 1763096 439747 0 
done.
Loading NimbusRomNo9L-ReguItal font from 
/var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2307264 878740 1763096 385118 0 
done.
Loading NimbusRomNo9L-Medi font from 
/var/lib/defoma/gs.d/dirs/fonts/n021004l.pfb... 2444504 1012113 1783192 401765 
0 done.
Loading NimbusRomNo9L-Regu font from 
/var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2581744 1137566 1783192 387726 
0 done.
>>showpage, press  to continue<<

Result: it shows the page with Nimbus Roman instead of Times New Roman, and
all letter spacing is fubared.

When I format all text with Nimbus Roman, I get:

%%DocumentFonts: NimbusRomanNo9L-Bold NimbusRomanNo9L-Italic NimbusRomanNo9L 
NimbusRomanNo9L-BoldItalic

in the .ps file, and then

ESP Ghostscript 7.07 (2003-07-12)
Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file 
/usr/share/ghostscript/fonts/NimbusRomanNo9L-Italic.
Can't find (or can't open) font file NimbusRomanNo9L-Italic.
Substituting font Times-Italic for NimbusRomanNo9L-Italic.
Loading NimbusRomNo9L-ReguItal font from 
/var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2170024 782484 1763096 440505 0 
done.
Loading NimbusSanL-ReguItal font from 
/var/lib/defoma/gs.d/dirs/fonts/n019023l.pfb... 2267072 876716 1763096 445071 0 
done.
Can't find (or can't open) font file 
/usr/share/ghostscript/fonts/NimbusRomanNo9L.
Can't find (or can't open) font file NimbusRomanNo9L.
Substituting font Times-Roman for NimbusRomanNo9L.
Loading NimbusRomNo9L-Regu font from 
/var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2404312 978219 1763096 385731 0 
done.
Loading NimbusSanL-Regu font from 
/var/lib/defoma/gs.d/dirs/fonts/n019003l.pfb... 2501360 1069070 1783192 393897 
0 done.
Can't find (or can't open) font file 
/usr/share/ghostscript/fonts/NimbusRomanNo9L-Bold.
Can't find (or can't open) font file NimbusRomanNo9L-Bold.
Substituting font Times-Bold for NimbusRomanNo9L-Bold.
Loading NimbusRomNo9L-Medi font from 
/var/lib/defoma/gs.d/dirs/fonts/n021004l.pfb... 2638600 1191705 1803288 385403 
0 done.
Loading NimbusSanL-Bold font from 
/var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 2735648 1286197 1803288 390241 
0 done.
Can't find (or can't open) font file 
/usr/share/gho