Open Bug 222009 Opened 22 years ago Updated 3 years ago

[ps] Postscript with wrong letter-spacing

Categories

(Core :: Printing: Output, defect)

x86
Linux
defect

Tracking

()

People

(Reporter: starback, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 In postscript output some non-ascii letters get too much spacing after them when using letter-spacing. The example file looks like this: <html> <head> <style type="text/css"> p { LETTER-SPACING: 0.9px; } </style> <body> <p>sm&aring;f&ouml;rn&auml;m </body> </html> Reproducible: Always Steps to Reproduce: 1. Go to <http://stp.ling.uu.se/~starback/bug/letter-spacing.html> 2. Print to a postscript file Actual Results: The postscript output has much more spacing after the three non-ascii letters than after the other letters. Expected Results: Uniform spacing. This is perhaps related to bug 195206. I don't know.
Confirming. The effect can be repeated using build ID 20031105. The problem is in nsAFMObject::GetStringWidth(). For characters in the range 000..377, the width of each character is looked up in a character metric table. The character number becomes an index into an array of character metric values. There are two problems with this: (1) The character number reflects Latin-1 encoding while the metric array is ordered by an adobe-specific encoding, and (2) the adobe encoding is sparse above value 0177, so not all values have a character assigned to them. For example, the sample contains an aring character, latin-1 character 0345 or 229, which is 444 units wide in times-roman. Mozilla subtracts 32 from the character number and retrieves the width of the 197th character in its times-roman width table. Unfortunately, the 197th character in the table is Ugrave with a width of 722.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Postscript with wrong letter-spacing → [ps] Postscript with wrong letter-spacing
I'm facing the same problem with non-ASCII characters when printing any text contained in an html justified paragraph in Mozilla for Linux. I've tried both 1.5 and 1.6 versions. If the text alignment is not justified, the problem does not occur. This problem also is not visible in "print preview", nor in Mozilla for Windows. This bug is of major severity for the work we have in our company. To reproduce the problem: Create a web page with the following code, open it in Mozilla and print it. <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body> <p style="text-align: justify;">The following word is a single word, without spaces between letters: eloq&uuml;&ecirc;ncia<br> </p> </body> </html>
Assignee: printing → nobody
QA Contact: printing
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.