Issue 74609 - PDF export problem with Times New Roman font - faulty character spacing - possible fixes
Summary: PDF export problem with Times New Roman font - faulty character spacing - pos...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.1
Hardware: PC Linux, all
: P3 Trivial with 5 votes (vote)
Target Milestone: ---
Assignee: h.ilter
QA Contact: issues@sw
URL:
Keywords:
: 70002 71161 73695 74759 75937 76489 78575 78895 (view as issue list)
Depends on:
Blocks: 81970 82069
  Show dependency tree
 
Reported: 2007-02-16 19:03 UTC by victor_j_slabinski
Modified: 2013-08-07 14:42 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Standard OOo Writer test file to demonstrate the font problem (11.57 KB, application/vnd.sun.xml.writer)
2007-02-16 19:08 UTC, victor_j_slabinski
no flags Details
PDF from Diagnostic Test b which illustrates the character spacing fault from "Export to pdf" (48.36 KB, application/pdf)
2007-02-16 19:11 UTC, victor_j_slabinski
no flags Details
PDF from Diagnostic Test e which shows change in character spacing fault when selecting "Kern pair" (48.47 KB, application/pdf)
2007-02-16 19:16 UTC, victor_j_slabinski
no flags Details
PDF from Diagnostic Test f which shows how "Expand to 0.1pt" can correct the character spacing fault (48.59 KB, application/pdf)
2007-02-16 19:18 UTC, victor_j_slabinski
no flags Details
Output of Linux command /usr/bin/chkfontpath (310 bytes, text/plain)
2007-02-16 19:20 UTC, victor_j_slabinski
no flags Details
Output of Linux command xset -q (1.04 KB, text/plain)
2007-02-16 19:21 UTC, victor_j_slabinski
no flags Details
Output of Linux command xdpyinfo (30.64 KB, text/plain)
2007-02-16 19:22 UTC, victor_j_slabinski
no flags Details
Standard OOo input which produces the character spacing fault (character jamming) when using "Export as pdf" (11.57 KB, application/vnd.oasis.opendocument.text)
2007-02-16 19:24 UTC, victor_j_slabinski
no flags Details
PDF from Diagnostic Test c which shows that Adobe Writer gives a PDF without faulty character spacing (32.63 KB, application/pdf)
2007-02-18 03:07 UTC, victor_j_slabinski
no flags Details
Screenshot with size and date of .ttf files I used. (3.83 KB, image/png)
2007-02-19 12:15 UTC, kpalagin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description victor_j_slabinski 2007-02-16 19:03:39 UTC
The problem is that composing a document under OOo Writer 2.1 using Times
New Roman font, Regular typeface, size 12 on a Linux system, followed by selecting
File > Export as pdf > Export / Export
gives a PDF file with some characters jammed together.  In some cases, the whole
space between characters is omitted (the space between words).  The problem with
the PDF file is observed using Adobe Reader 7.0 under the Linux operating system
and also using Adobe reader 7.0 under Windows XP.  The jamming together of some
characters is obvious on the computer monitor screen and also on an Adobe printout.

     This issue might be considered as a reopening of issue 18559 and all the
duplicates listed under that issue.  The problem reported here differs from the
previous issue reports in that
a) OOo Writer 2.0 and 2.1 give the problem (previous issues were for version 1.x);
b) no apostrophes in the text are involved;
c) no font with a name ending in L is involved; and
d) some workarounds that cure the problem are presented under "Diagnostic Tests".

System Used for Tests

a) OpenOffice.org Writer 2.1 downloaded directly from your web site on 2007 Feb
7 and operating under Linux distribution 2.6.19-1.2895.fc6 #1 on my office PC.
b) The display is running on the same computer as OOo.
c) There are no notable enhancements to the system regarding the display or desktop.
d) Besides the fonts that came with the Linux distribution, MicroSoft True Type
Corefonts (MSTT) were added to the operating system.
e) For this report of a font related bug, I also include the requested output
files from certain Linux commands:
     /usr/bin/chkfontpath > stuff.chkfontpath
     xset -q              > stuff.xset
     xdpyinfo             > stuff xdpyinfo     - for display settings
f) Other files also included as attachements are:
     test_OOo_file.odt    - a file to be used to generate the faulty PDF output
     export_file1.pdf            - output from diagnostic test b
     file_from_Adobe_Writer.pdf  - output from diagnostic test c
     export_file2.pdf            - output from diagnostic test e
     export_file3.pdf            - output from diagnostic test f

DIAGNOSTIC TESTS

a) No problem occurs when using Courier fonts (fixed spacing fonts) or the
Bitstream Character font (the only other proportional spacing font on my computer).

When using Times New Roman, Regular typeface, size 12:

b) The STANDARD TEST is to use OOo Writer 2.1 and select
     File > Open   select test_OOo_file.odt   / Open
to display the standard test file.
     File > Print / OK  gives a printed copy of the file which shows none of the
character spacing problems found in the output PDFs.
     {In diagnostic tests e and f, an additional operation is inserted here.}
     File > Export as pdf   In "Export" dialogue box, give the file name
                            "export_file1"  / Export / Export
to obtain output file  export_file1.pdf  which is included as an attachment.

     Viewing the export file with Adobe Reader 7.0 shows that various successive
characters are jammed together (faulty spacing) as shown on the terminal screen
 and in a printout from Adobe Reader; many of these errors are flagged in the
file's text.  I particularly note that the jamming together of a particular
character pair does not occur in all cases.
In line 2, the word "problem" has BL jammed together.
In line 5, "problem" displays and prints normally.
In line 7, the whole space after "problem" is omitted so that "problemin"
displays and prints as one word.

     This jamming of characters does not depend on settings in the "Export as
pdf" dialogue box.

c) To demonstrate that Adobe Reader 7.0 was working properly, I ran the
following test.
     File > Open   select  test_OOo_file.odt  / Open
to display the standard test file.
     File > SaveAs  /  For File type, select Micorsoft Word XP (.doc) / Save
to get output file  test_OOo_file.doc .  I sent this to another computer with
Adobe Writer (Adobe Acrobat 6.0 Professional) which produced the file
'file_from_Adobe_Writer.pdf'  which is included as an attachment.

     Using this file in Adobe Reader 7.0 on the first computer (using Linux) and
also on another computer (using Windows XP) gives a text display and printout
with no problems (no character jamming) in the text.  I note that many comments
in the text are now superfluous and not appropriate; I left them in because I
wanted to use the same input file in all diagnostic tests.

     [The equation at the bottom of the file does not display or print correctly
(because of the conversion to Word .doc format), but that is a separate issue
not dealth with here.]

d) A workaround that gives a PDF without character jamming AND ALSO displays the
equation correctly uses the following commands:
     File > Open   select  test_OOo_file.odt  / Open
to display the standard test file.
     File > Print   check "Print to file"  / OK
outputs a PostScript file  test_OOo_file.ps .
     File > Exit  .

     On the Linux command line enter
     ps2pdf  test_OOo_file.ps
This command outputs the PDF  test_OOo_file.pdf ; Adobe Reader 7.0 shows this
file displays and prints the text without any character jamming, and also gives
a correct equation.

     This workaround was suggested by my colleague Andrew Cenko.

     THIS TEST STRONGLY INDICATES THAT there is a bug in "Export to pdf" rather
than in some other OOo function.

e) The above tests were done with the "Character Spacing" values of:
     "Kern pairs" not checked;  Spacing  "Default" .
We now experiment with these values.
     File > Open   select  test_OOo_file.odt  / Open
to display the standard test file.
     Use the cursor to highlight the whole document display.
     Format > Character / Position   Under "Spacing", check "Kern pairs"  /  OK
     File > Export as pdf   In "Export" dialogue box, give the file name
                            "export_file2"  / Export / Export
to obtain output file  export_file2.pdf  which is included as an attachment.

     Adobe Reader 7.0 operating on this file shows that selecting the "Kern
pairs" option removes some of the character jamming, leaves other character
jamming unchanged, and introduces some new character jamming pairs.  I note
especially:

In the text, in the "Example" line that starts "Daniel was pleasant ...", the FF
in "office" now appears as a single character F, but the whole space now appears
between "office" and "and".

In the following line that starts "no particular difficulty ...", the characters
 UL in "difficulty" are no longer jammed together, but the characters FF are now
jammed together.

     THIS TEST DEOMONSTRATES THAT THE CHARACTER SPACING SETTINGS somehow
adversely affect the Times New Roman font but the problem only appears on
"Export as pdf".

f) This test demonstrates a "Character Spacing" setting that solves the "Export
as pdf" problem.
     File > Open   select  test_OOo_file.odt  / Open
to display the standard test file.
     Use the cursor to highlight the whole document display.
     Format > Character / Position   Under "Spacing", select "Expand [to] 0.1pt"
          
                                     ("Kern pairs" does not matter)/  OK
     File > Export as pdf   In "Export" dialogue box, give the file name
                            "export_file3"  / Export / Export
to obtain output file  export_file3.pdf  which is included as an attachment.

     Adobe Reader 7.0 operating on this file shows that there is now no jamming
of adjacent characters.  The text font is slightly spread out horizontally which
changes the word rap at the end of lines, but that change occurs in the .odt
document before we "Export as pdf".  But "Export as pdf" works correctly here
for the Times New Roman font; there is no character spacing fault and the
equation displays correctly.

                                *    *    *    *    *
     These diagnostic tests should provide plenty of clues as to the cause of
the pdf faulty character spacing (jamming) problem.

End of description.  I may have to supply the attachements as "Additional
Comments". - VJS
Comment 1 victor_j_slabinski 2007-02-16 19:08:03 UTC
Created attachment 43088 [details]
Standard OOo Writer test file to demonstrate the font problem
Comment 2 victor_j_slabinski 2007-02-16 19:11:08 UTC
Created attachment 43089 [details]
PDF from Diagnostic Test b which illustrates the character spacing fault from "Export to pdf"
Comment 3 victor_j_slabinski 2007-02-16 19:16:17 UTC
Created attachment 43090 [details]
PDF from Diagnostic Test e which shows change in character spacing fault when selecting "Kern pair"
Comment 4 victor_j_slabinski 2007-02-16 19:18:41 UTC
Created attachment 43091 [details]
PDF from Diagnostic Test f which shows how "Expand to 0.1pt" can correct the character spacing fault
Comment 5 victor_j_slabinski 2007-02-16 19:20:23 UTC
Created attachment 43092 [details]
Output of Linux command  /usr/bin/chkfontpath
Comment 6 victor_j_slabinski 2007-02-16 19:21:11 UTC
Created attachment 43093 [details]
Output of Linux command  xset -q
Comment 7 victor_j_slabinski 2007-02-16 19:22:24 UTC
Created attachment 43094 [details]
Output of Linux command  xdpyinfo
Comment 8 victor_j_slabinski 2007-02-16 19:24:46 UTC
Created attachment 43095 [details]
Standard OOo input which produces the character spacing fault (character jamming) when using "Export as pdf"
Comment 9 victor_j_slabinski 2007-02-16 19:33:54 UTC
In the first attachment, please change the Description to read 
"Standard OOo Writer test file to demonstrate the font problem
(application/vnd.oasis.opendocument.text)"
and delete the last attachment (duplicate of first attachment file).

Victor J. Slabinski
Comment 10 Regina Henschel 2007-02-16 20:03:16 UTC
Works for me with WinXP, I get no errors. If have got font file "times.ttf" with
change day 18. Oct 2002, Times New Roman Version 3.00.
Comment 11 victor_j_slabinski 2007-02-18 03:07:39 UTC
Created attachment 43116 [details]
PDF from Diagnostic Test c which shows that Adobe Writer gives a PDF without faulty character spacing
Comment 12 kpalagin 2007-02-18 06:08:54 UTC
Confirming with 2.1 on Suse10.2 (running in Virtual PC) - I get the same 
spacing problems as described in "export_file1.pdf".
As always, virtual machine image can be uploaded for developers upon request.
Comment 13 michael.ruess 2007-02-18 11:41:35 UTC
Reassigned to HI.
Comment 14 h.ilter 2007-02-19 11:31:32 UTC
Could not reproduce, please take a look.
Comment 15 kpalagin 2007-02-19 12:15:23 UTC
Created attachment 43163 [details]
Screenshot with size and date of .ttf files I used.
Comment 16 kpalagin 2007-02-19 12:16:20 UTC
I can provide those .ttf files if necessary.
Comment 17 philipp.lohmann 2007-02-22 11:25:13 UTC
tentative target
Comment 18 philipp.lohmann 2007-02-23 11:36:52 UTC
*** Issue 74759 has been marked as a duplicate of this issue. ***
Comment 19 philipp.lohmann 2007-02-27 09:37:34 UTC
*** Issue 71161 has been marked as a duplicate of this issue. ***
Comment 20 philipp.lohmann 2007-02-27 09:40:14 UTC
*** Issue 70002 has been marked as a duplicate of this issue. ***
Comment 21 philipp.lohmann 2007-02-27 10:49:29 UTC
The root cause for this is freetype/WinGDI having different opinions about
advance widths than our subsetter code. I'll need to have a method to bring them
in sync.
Comment 22 philipp.lohmann 2007-03-02 16:46:37 UTC
fixed in CWS glyphadv
Comment 23 philipp.lohmann 2007-03-05 16:36:36 UTC
please verify in CWS glyphadv
Comment 24 h.ilter 2007-03-26 16:50:29 UTC
Verified with cws glyphadv = ok
Comment 25 philipp.lohmann 2007-04-23 08:37:25 UTC
*** Issue 73695 has been marked as a duplicate of this issue. ***
Comment 26 h.ilter 2007-04-25 11:09:10 UTC
Still ok in 680m209_9139
Comment 27 h.ilter 2007-04-25 11:47:49 UTC
*** Issue 76489 has been marked as a duplicate of this issue. ***
Comment 28 caolanm 2007-06-27 09:50:08 UTC
*** Issue 78895 has been marked as a duplicate of this issue. ***
Comment 29 hdu@apache.org 2007-07-02 08:24:41 UTC
*** Issue 75937 has been marked as a duplicate of this issue. ***
Comment 30 hdu@apache.org 2007-08-07 15:39:46 UTC
*** Issue 78575 has been marked as a duplicate of this issue. ***