You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Cornelis Hoeflake (JIRA)" <ji...@apache.org> on 2014/10/10 12:02:33 UTC

[jira] [Created] (PDFBOX-2422) PDFont.getStringWidth results in stackoverflow

Cornelis Hoeflake created PDFBOX-2422:
-----------------------------------------

             Summary: 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


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)