You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/09/14 17:56:00 UTC

[jira] [Commented] (PDFBOX-4944) Built-in fonts are reporting nbsp char as having zero width.

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

ASF subversion and git services commented on PDFBOX-4944:
---------------------------------------------------------

Commit 1881716 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1881716 ]

PDFBOX-4944: treat nbspace like space

> Built-in fonts are reporting nbsp char as having zero width.
> ------------------------------------------------------------
>
>                 Key: PDFBOX-4944
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4944
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.21
>            Reporter: Dan Fickling
>            Priority: Major
>              Labels: regression
>             Fix For: 3.0.0 PDFBox, 2.0.22
>
>
> {{        PDFont font = PDType1Font.HELVETICA; // Also tested with Times.}}
> {{        System.out.println("width = " + font.getStringWidth("\u00a0"));}}
>  
> {{Non-breaking space is reporting as zero width (standard 14 fonts) in 2.0.21 while being encoded as a (width taking) character. As you can imagine this causes serious errors in line and justification layout.}}
>  
> Related:
> Prior to PDFBOX-4891 non-breaking space threw an IllegalArgumentException.
>  
> {{Originally reported at Github:}}
> [https://github.com/danfickle/openhtmltopdf/issues/543]
>  
> Discovered by Github user lagar84.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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