Bug 51076 - use of base 14 fonts with text-rendering 'auto' (use native pcl fonts) produces ipd misalignment due to metrics mismatch
Summary: use of base 14 fonts with text-rendering 'auto' (use native pcl fonts) produc...
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pcl (show other bugs)
Version: 1.0
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 10:16 UTC by Dorothy Weil
Modified: 2012-05-17 14:56 UTC (History)
1 user (show)



Attachments
I have attached the pcl with underline issue from linux OS (538 bytes, application/octet-stream)
2011-04-18 10:16 UTC, Dorothy Weil
Details
PCL, FO for Space issue (760.49 KB, application/x-zip-compressed)
2012-04-25 06:46 UTC, Divakar P
Details
minimal FO and respective PCl and PDF documents (13.90 KB, application/x-zip-compressed)
2012-05-16 10:26 UTC, Divakar P
Details
maximally minimal test FO and output files (5.11 KB, application/zip)
2012-05-16 16:23 UTC, Glenn Adams
Details
test files with/without "bitmap" text-rendering configuration (4.70 KB, application/x-zip-compressed)
2012-05-17 11:47 UTC, Divakar P
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dorothy Weil 2011-04-18 10:16:58 UTC
Created attachment 26893 [details]
I have attached the pcl with underline issue from linux OS 

While the PCL underlining and highlighting generation works fine when generated on a windows OS, the same generation in a Linux environment produces underlining and highlighting that does not account for non monospaced fonts. Note that other formats such as RTF does produce the correct spacing.  I have picked up a later version to see if the problem is still happening and it is.
Comment 1 Glenn Adams 2012-04-07 01:43:02 UTC
resetting P2 open bugs to P3 pending further review
Comment 2 Glenn Adams 2012-04-08 05:10:19 UTC
please provide a minimal input FO file that corresponds to the attached PCL output file; also provide a PDF output file that demonstrates lack of problem
Comment 3 Glenn Adams 2012-04-24 05:38:19 UTC
(In reply to comment #2)
> please provide a minimal input FO file that corresponds to the attached PCL
> output file; also provide a PDF output file that demonstrates lack of problem

Dorothy, I am still awaiting your input as requested above. if I see no further input by April 30, I will close this bug due to lack of requested information. Regards, Glenn

P.S. I realize you or someone in your firm forwarded some data files, but I need you to attach them to this bug before I can move forward with it.
Comment 4 Divakar P 2012-04-25 06:46:41 UTC
Created attachment 28673 [details]
PCL, FO for Space issue

Please find the attached FO and corresponding PCL, RTF and  PDF documents.

Issue details:
We are getting extra  trailing and leading spaces, when the text is  Underlined/Bold/Highlighted/Italic and the font-family is like Times New Roman, Arial etc. (Native fonts).
Comment 5 Glenn Adams 2012-04-25 06:59:54 UTC
(In reply to comment #4)
> Created attachment 28673 [details]
> PCL, FO for Space issue
> 
> Please find the attached FO and corresponding PCL, RTF and  PDF documents.
> 
> Issue details:
> We are getting extra  trailing and leading spaces, when the text is 
> Underlined/Bold/Highlighted/Italic and the font-family is like Times New Roman,
> Arial etc. (Native fonts).

I need the input FO file to be pared down to be "maximally minimal". A maximally minimal input FO test file is one from which nothing cannot be removed without either removing the problem or invalidating the file.

Once you do this, regenerate the output files you have attached using the pared down input file.
Comment 6 Glenn Adams 2012-04-25 07:01:52 UTC
(In reply to comment #5)
> A maximally minimal input FO test file is one from which nothing cannot be
> removed without either removing the problem or invalidating the file.

s/nothing cannot/nothing can/
Comment 7 Dorothy Weil 2012-04-25 12:14:03 UTC
Is there a way to remove me from this bug and give ownership to troy.cleasby@thomsonreuters.com
Comment 8 Glenn Adams 2012-04-25 14:06:24 UTC
(In reply to comment #7)
> Is there a way to remove me from this bug and give ownership to
> troy.cleasby@thomsonreuters.com

i can't change the "reporter" field, so i can't remove you; however, troy can add himself to the CC list (he will need to create a bugzilla account to add)
Comment 9 Divakar P 2012-05-16 10:26:47 UTC
Created attachment 28788 [details]
minimal FO and respective PCl and PDF documents

Please find the attached minimal FO and corresponding PCL and PDF documents.
Comment 10 Glenn Adams 2012-05-16 15:03:52 UTC
(In reply to comment #9)
> Created attachment 28788 [details]
> minimal FO and respective PCl and PDF documents
> 
> Please find the attached minimal FO and corresponding PCL and PDF documents.

please attach the fop.xconf file you are using
Comment 11 Glenn Adams 2012-05-16 16:23:11 UTC
Created attachment 28794 [details]
maximally minimal test FO and output files

this attachment contains a maximally minimal test input file and resulting output PDF and PCL files (using current dev trunk build); it is clear from this test that the problem pertains to the handling ipd of a generated inline area, irrespective of the additional styling applied to that inline
Comment 12 Glenn Adams 2012-05-16 21:47:41 UTC
initial investigation indicates that the problem is related to differences between font metrics used for the 14 base PDF fonts and use of built-in (native) PCL fonts;

if the fop.xconf is configured as follows:

    <renderer mime="application/x-pcl">
      ...
      <text-rendering>bitmap</text-rendering>
      ...
    </renderer>

then no extra space appears

n.b. that the current FOP documentation at [1] incorrectly says to use MIME type

application/vnd.hp-PCL

however, this doesn't work; instead, you must use

application/x-pcl

[1] http://xmlgraphics.apache.org/fop/trunk/output.html#pcl
Comment 13 Divakar P 2012-05-17 11:47:39 UTC
Created attachment 28798 [details]
test files with/without "bitmap" text-rendering configuration

We have tested your FO with "bitmap" text-rendering configuration. The Document looks good, in the sense it resolves the spacing issues. but it will increase the size of PCl document(~10+ times high) and it affects our download performance. 

Please find the atttached FO and respective PCL documents with/without "bitmap" text-rendering configuration.
Comment 14 Glenn Adams 2012-05-17 14:56:18 UTC
(In reply to comment #13)
> Created attachment 28798 [details]
> test files with/without "bitmap" text-rendering configuration
> 
> We have tested your FO with "bitmap" text-rendering configuration. The
> Document looks good, in the sense it resolves the spacing issues. but it
> will increase the size of PCl document(~10+ times high) and it affects our
> download performance. 

yes, i'm aware of this negative side effect, but at least it solves the immediate problem;

i cannot predict when the underlying problem (of making use of correct pcl native font metrics) will be addressed; in fact, it will probably wait for an interested party to perform the work and submit a patch; if your organization can do this work (or sponsor someone else to do it), then it would accelerate providing a full fix that does not rely on use of bitmap renderings;

> Please find the atttached FO and respective PCL documents with/without
> "bitmap" text-rendering configuration.