Closed Bug 116439 Opened 23 years ago Closed 23 years ago

Xprint module prints sometimes underlined text wrong

Categories

(Core Graveyard :: Printing: Xprint, defect, P1)

All
Linux

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: roland.mainz, Assigned: roland.mainz)

References

()

Details

Attachments

(4 files, 2 obsolete files)

Xprint module seems to have problems with underlined text - the line under the text is sometimes too short.
Example (pls ignore that the colors are slighly wrong - that's a sdtimage bug ... ;-( )
See bug 8322 for a similar bug in GfxWin which was solved by special-casing. But in the case of bug 8322, the line was too long, and the fix was simpler there because it amounts to clip the drawing area. When the line is too short, hmm...
rbs: But it is not only the underline which is wrong here... looking at attachment 62553 [details] - the underlined text parts partially overwrite other text. Is it possible that the font metrics information is wrong or gets interpreted the wrong way ?
Xprt loads the following fonts while printing the example URL: -- snip -- XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-medium-r-normal--34-240-100-100-p-176-iso8859-1') returned d3fc78 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1') returned e9d228 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-bold-r-normal--50-120-300-300-p-0-iso8859-1') returned ea21a8 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-medium-r-normal--50-120-300-300-p-0-iso8859-1') returned ea2fa0 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-times-medium-r-normal--34-240-100-100-p-170-iso8859-1') returned ea6860 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-medium-r-normal--17-120-100-100-p-88-iso8859-1') returned f62578 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-times-medium-r-normal--34-240-100-100-p-170-iso8859-1') returned ccef68 -- snip -- Restricting Xprt to buildin printer fonts fixes this issue. Xprt in only-printer-buildin mode loads the following fonts: -- snip -- XLoadQueryFont(aDisplay=':1.0',mName='-adobe-times-medium-r-normal--50-120-300-300-p-0-iso8859-1') returned d13aa0 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-medium-r-normal--50-120-300-300-p-0-iso8859-1') returned d6f968 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-bold-r-normal--50-120-300-300-p-0-iso8859-1') returned 7cd368 XLoadQueryFont(aDisplay=':1.0',mName='-adobe-helvetica-medium-r-normal--0-0-1200-1200-p-0-iso8859-1') returned cdeee8 -- snip -- The root of this problem seems to be that somehow 100DPI fonts are used on a 300DPI device ... ... can anyone explain why these fonts are used - and why we calculate the text width wrong ?
Taking ...
Assignee: katakai → Roland.Mainz
QA Contact: Roland.Mainz → katakai
Status: NEW → ASSIGNED
Depends on: 104075
Priority: -- → P1
Target Milestone: --- → mozilla0.9.8
Requesting r=/sr= ...
Keywords: patch, review
Attachment #63201 - Attachment is obsolete: true
Comment on attachment 63270 [details] [diff] [review] Better patch for 2002-01-01-08-trunk per timeless's IRC comments change 'May be'=>'Maybe' change 'builtin'=>'built-in' sorry, this one's my fault I knew buildin was wrong but i didn't think carefully enough to remember that you need a hyphen. http://www.m-w.com/cgi-bin/dictionary?va=built-in i'd like a comment near the out of memory condition (PR_smprintf) but it's ok w/o one. later i think i'd like to change 'printer built-in fonts' to 'built-in printer fonts'
Attachment #63270 - Flags: review+
A couple of items: 1) minor: would you add a note explaining how one tell from the XLFD that a font is "'mysterious' and 'spurious'" 2) Could we resolve this: "I am not sure what Xprint printer builtin fonts really look like" Otherwise everything looks reasonable.
Brian Stell wrote: > 1) minor: would you add a note explaining how one tell from the XLFD that a > font is "'mysterious' and 'spurious'" That comment is from Jungshik Shin's patch (attachment 53094 [details] [diff] [review] - see http://bugzilla.mozilla.org/show_bug.cgi?id=94327#c34). I do not have a real clue what went wrong there - but his patch fixed the issue in bug 94327 - therefore I copied it "blindly" into my patch (and tested it) ... :) > 2) Could we resolve this: > "I am not sure what Xprint printer builtin fonts really look like" Not really. AFAIK there is no written spec which says "Xprint built-in fonts look like this ...". Thomas Gilg at HP (e.g. one of the original authors of Xprint) may have more infos ... :-) However - the X.org code works like this and eXceed's version of Xprt does the same. I'll take that as the "spec"... :-))
Attachment #63270 - Attachment is obsolete: true
Comment on attachment 63311 [details] [diff] [review] New patch for 2002-01-01-08-trunk to match r=timeless sr=jag
Attachment #63311 - Flags: superreview+
Attachment #63311 - Flags: review+
Fix checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified on 2002011614 linux build.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: