Closed
Bug 85417
Opened 23 years ago
Closed 23 years ago
[Xlib] Xlib/Xprint do not display/print em-dash & co. correctly...
Categories
(Core :: XUL, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
()
Details
(Keywords: fonts)
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
[this is related to bug 51288 ("Use standard PostScript glyphs for some Unicode
characters")]
Xprint module does not print special glyphs like em-dash or dagger correctly -
they appear correctly on screen - but Xprint module prints '?' or '¼' instead...
I'll attach a testcase...
Assignee | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
Assign to Roland.
Assignee: katakai → Roland.Mainz
QA Contact: Roland.Mainz → katakai
Assignee | ||
Comment 3•23 years ago
|
||
I see the same problem in Xlib-toolkit... well... looks like an issue in
nsFontmetricsXP.cpp (again... :-)...
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 4•23 years ago
|
||
Xlib toolkit has the same problem - all the "em-dash & co."-glyphs are
displayed/printed as '?' ... ;-(
----
CC:'ing the gods of font stuff {rbs@maths.uq.edu.au,bstell@netscape.com} - I
need their help with this issue... at least one or two hints what may cause
this issue ... ;-(
Blocks: 79119
Summary: Xprint module does not print em-dash & co. correctly... → [Xlib] Xlib/Xprint do not display/print em-dash & co. correctly...
Target Milestone: mozilla1.0 → mozilla0.9.5
Comment 6•23 years ago
|
||
First, let me say that I am not at all experienced with moz's
XPrint code.
If I were working on this problem the first thing I would
try to do is determine what encoding, character, and font
was used to send to the XPrint server. I'd use a breakpoint or
printf in the draw routine.
Mozilla's draw routines get Unicode values so the font
selected should control which converter was used. Once the
converted character value was known I would look it up in a
reference for that encoding to make sure it is the expected
character. I would then use xfd to display that character in
the selected font and I would look at the glyph to verify that
the font is correct.
If all this looks okay then I would make a very simple test
program to verify if the XPrint server is or is not printing
correctly. If it does not print correctly I would submit this
test program to the XPrint server developers as a bug report.
(If the test program prints correctly then I would have to
scratch my head and try to figure out what I had missed.)
Assignee | ||
Comment 7•23 years ago
|
||
bstell:
Mozilla's Xprint module shares a _huge_ part of code with the Xlib toolkit
(nsFontMetricsXlib*, nsRenderingContextXlib.* etc. etc.) - and Xlib toolkt
suffers from the same bug... I assume the bug does not sit in the Xprt server (X
print server)... :-)
Wanna build a Xlib toolkit Zilla (configure --enable-toolkit=xlib) and see if
you can catch this issue, please ?
Assignee | ||
Comment 8•23 years ago
|
||
Fixing COMPONENT to "XP Toolkit/Widgets" - this is not an Xprint module specific
issue, Xlib toolkit is affected, too.
Adding "HELPWANTED" keyword... I spend some time on debugging the issue forth
and back - and failed to kill this issue... ;-(
Severity: normal → critical
Component: Printing: Xprint → XP Toolkit/Widgets
Keywords: helpwanted
Priority: -- → P2
Assignee | ||
Comment 9•23 years ago
|
||
rbs:
Is there any common detail between "em-dash"&co. and MathML fonts/chars which
may explain this issue ?
Keywords: fonts
Comment 10•23 years ago
|
||
This bug sounds like another hard bug:
"Xprint [and Xlib] module does not print special glyphs like em-dash or dagger
correctly - they appear correctly on screen - but Xprint module prints '?' or
'¼' instead..."
i.e., screen=ok, printer=bad. I sincerely have no idea as to what is happening.
Comment 11•23 years ago
|
||
Could the X server and XPrint server have different font paths?
Assignee | ||
Comment 12•23 years ago
|
||
rbs@maths.uq.edu.au wrote:
> This bug sounds like another hard bug:
That's this one... I only changed the SUMMARY of the bug.
> "Xprint [and Xlib] module does not print special glyphs like em-dash or dagger
> correctly - they appear correctly on screen - but Xprint module prints '?' or
> '¼' instead..."
>
> i.e., screen=ok, printer=bad. I sincerely have no idea as to what
> is happening.
No no. screen[Xlib_toolkit]=bad, printer=bad.
Noth suffer from the same problem.
Only screen[GTK+_toolkit]=ok
Assignee | ||
Comment 13•23 years ago
|
||
Brian Stell wrote:
> Could the X server and XPrint server have different font paths?
No, I usually start Xprt like this:
-- snip --
% Xprt -fp $(xset q | fgrep "/X11/fonts/misc/") -audit 4 :1
-- snip --
And as I wrote few secs ago to rbs - Xlib toolkit suffers from _exactly_ the
same problem - I only changed the SUMMARY of this bug (sorry for the
confusion...).
Comment 14•23 years ago
|
||
Because of glyph fill-in I had the same problem in the GTK code trying
to figure out where the code was looking for glyphs. I believe that this
is the reason Erik added NS_FONT_DEBUG_LOAD_FONT and it is definitely the
reason I added FIND_FONT_PRINTF.
If I were working on the problem I would add in these debug tools and
then make a simple test case that only displayed one char. I could
then know where it got (or failed to get) the glyph from.
We should also seriously consider merging the GTK+ and Xlib code.
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 15•23 years ago
|
||
This issue is still present... ;-(
Retargeting to 0.9.6 milestone...
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Assignee | ||
Comment 16•23 years ago
|
||
bstell:
Is it possible that we simply do not have the neccesary unicode converter
loaded/linked/build ?
Comment 17•23 years ago
|
||
I'd recommend making a very short test page (just one char) and breakpointing
in DrawString.
After the conversion:
int len = mCharSetInfo->Convert(mCharSetInfo, mFont, aString, aLength,
p, bufLen);
Look at the value in the buffer (p).
Comment 18•23 years ago
|
||
Looks like this won't make it in for 0.9.6.
Assignee | ||
Comment 19•23 years ago
|
||
Still no clue, retargeting ...
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Assignee | ||
Comment 20•23 years ago
|
||
This patch generates a lot of assertions like this when viewing the testcase:
-- snip --
Document http://bugzilla.mozilla.org/showattachment.cgi?attach_id=38071 loaded
successfully
###!!! ASSERTION: no gFontSubConverter: 'gFontSubConverter', file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
###!!! Break: at file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
###!!! ASSERTION: no gFontSubConverter: 'gFontSubConverter', file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
###!!! Break: at file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
###!!! ASSERTION: no gFontSubConverter: 'gFontSubConverter', file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
###!!! Break: at file
../../../../../../../../home/mozilla/src/2002-02-27-08-trunk/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp,
line 2334
-- snip --
which indicates that
-- snip --
nsComponentManager::CreateInstance(kSaveAsCharsetCID, nsnull,
NS_GET_IID(nsISaveAsCharset),
(void**) &gFontSubConverter);
-- snip --
is failing... but why ?
Assignee | ||
Comment 21•23 years ago
|
||
This mess was caused by a simple typo... nice... xx@@!!!... ;-(
Attachment #71961 -
Attachment is obsolete: true
Assignee | ||
Comment 22•23 years ago
|
||
Requesting r=/sr= ...
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 23•23 years ago
|
||
Comment on attachment 71976 [details] [diff] [review]
Patch for 2002-02-27-08-trunk
I think what you want is attr_EntityAfterCharsetConv. This is what GfxWin uses.
See my description in bug 33498 comment #4.
Assignee | ||
Comment 24•23 years ago
|
||
rbs:
I am using the same call as GTK+ (except that typo), see
http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#2544
Comment 25•23 years ago
|
||
Yep, I know -- that's why I pointed you at my earlier description. The GTK call
itself is not doing what you might want. I am just profiting from this
opportunity for a fixup.
Comment 26•23 years ago
|
||
Assignee | ||
Comment 27•23 years ago
|
||
OT: Another issue... the chars which were previously rendered as '?' (fixed by
my attachment 71976 [details] [diff] [review]) do not scale with the text zoom (setting text zoom to 300%
does not scale the chars, they are still in the same size as in 100% text zoom
mode).
Backing out the patch doesn't help either, the '?' are not scaled, too.
GTK+-based Zilla does scale them correctly.
Does anyone have an idea where this problem may hide ?
Comment 28•23 years ago
|
||
Roland: would you try rgb's suggestion and if it is okay we should also
apply it to the GTK code.
> the chars which were previously rendered as '?' (fixed by my attachment
> 71976) do not scale with the text zoom
This sounds like a separate problem from this bug since the Gtk port
does scale them. Perhaps you could open a new bug for this.
Shanjian: can you help Roland with this
Assignee | ||
Comment 29•23 years ago
|
||
Brian Stell wrote:
> Roland: would you try rgb's suggestion and if it is okay we should also
> apply it to the GTK code.
I filed bug 128530 ("Use |nsISaveAsCharset::attr_EntityAfterCharsetConv| instead
of |nsISaveAsCharset::attr_EntityBeforeCharsetConv| in GTK+/Xlib toolkits") to
handle this and attached a patch there...
No longer blocks: 128530
Comment 30•23 years ago
|
||
Comment on attachment 71976 [details] [diff] [review]
Patch for 2002-02-27-08-trunk
r=bzbarsky on the code if we want this right now, as long as we have a separate
bug to do this right....
Attachment #71976 -
Flags: review+
Assignee | ||
Comment 31•23 years ago
|
||
Yes, it's the right thing for now... text zoom for these special chars (like
dagger etc. - all others are working) doesn't work, but at least we can
display/print the chars now. Better than nothing... :)
Assignee | ||
Comment 32•23 years ago
|
||
Fix integrated into the patch for bug 128748 ...
Depends on: 128748
Assignee | ||
Comment 33•23 years ago
|
||
Patch for bug 128748 has been checked in, marking this bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 34•23 years ago
|
||
Follow-up is bug 129666 ("[Xlib] Xlib/Xprint do not scale em-dash & co.
correctly...") ...
You need to log in
before you can comment on or make changes to this bug.
Description
•