[ 
https://issues.apache.org/jira/browse/PDFBOX-4130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378997#comment-16378997
 ] 

Tilman Hausherr commented on PDFBOX-4130:
-----------------------------------------

improved files:
 - PDFBOX-3937-7CSTFGJFWQDXKXNURT3VV3MSVSKTZG47-p4.pdf
 - your file

not improved:
 - gs-bugzilla693663-p9.pdf
 - PDFBOX-122.pdf
 - bug864847.pdf
 - PDFJS-7523.pdf

worsened:
 - PDFBOX-3964.pdf: "6.0" should be displayed as "6 . 0"

I then reran the test with a slight change, starting {{getWidthForCID}} like 
this:
{code:java}
    private float getWidthForCID(int cid, int code)
    {
        Float width = widths.get(cid);
        if (width == null && dict.getDictionaryObject(COSName.DW) instanceof 
COSNumber)
        {
            width = getDefaultWidth();
        }
{code}
And now gs-bugzilla693663-p9.pdf and your file have improved, but not 
PDFBOX-3937-7CSTFGJFWQDXKXNURT3VV3MSVSKTZG47-p4.pdf.

I wonder if you could have a look at the last patch in PDFBOX-3457 to see 
whether this inspires you somehow?

 

> When W entries not included in CIDFont get width from font by code, Improve 
> display of some PDF files.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4130
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4130
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.8, 3.0.0 PDFBox
>            Reporter: chunlinyao
>            Assignee: Tilman Hausherr
>            Priority: Major
>         Attachments: DateTest.pdf, after.png, before.png, diff.patch
>
>
> Some PDF use CJK font without embedded subset displayed incorrectly, the 
> alphabet become wider.
> This is before the patch.
>   !before.png!
>  
> This is after the patch.
> !after.png!
> The test file [^DateTest.pdf]
> ^This patch only get width from font when these isn't a W entry in CIDFont. 
> If there is an W entry, then any cid not in W entries will return default 
> width.^



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to