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

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

Commit 1631609 from [~jahewson] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1631609 ]

PDFBOX-2422: Set font descriptor when embedding simple TTFs

> PDFont.getStringWidth results in stackoverflow
> ----------------------------------------------
>
>                 Key: PDFBOX-2422
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2422
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Cornelis Hoeflake
>            Assignee: John Hewson
>             Fix For: 2.0.0
>
>
> When loading a true type font and calling getStringWidth("é") will result in 
> a stackoverflow. Calling the method with a 'regular' character is ok.
> {code:title=Example code}
> PDDocument doc = new PDDocument();
> // load a font which is in PDFBox
> PDTrueTypeFont font = PDTrueTypeFont.loadTTF(doc, 
> getClass().getResourceAsStream("/org/apache/pdfbox/resources/ttf/LiberationSans-Regular.ttf"));
> font.getStringWidth("éé");
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to