You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2019/07/12 16:10:00 UTC

[jira] [Updated] (PDFBOX-4595) PDCIDFontType0 getHeight return 0

     [ https://issues.apache.org/jira/browse/PDFBOX-4595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr updated PDFBOX-4595:
------------------------------------
    Fix Version/s: 3.0.0 PDFBox
                   2.0.17

> PDCIDFontType0 getHeight return 0
> ---------------------------------
>
>                 Key: PDFBOX-4595
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4595
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.16
>            Reporter: Zhichao Yang
>            Priority: Major
>             Fix For: 2.0.17, 3.0.0 PDFBox
>
>
> In pdmodel/font/PDCIDFontType0.java :
> {code:java}
> public float getHeight(int code) throws IOException
> {
>     int cid = codeToCID(code);
>     float height = 0;
>     if (!glyphHeights.containsKey(cid))
>     {
>         height =  (float) getType2CharString(cid).getBounds().getHeight();
>         glyphHeights.put(cid, height);
>     }
>     return height;
> }
> {code}
>  
> When the glyph is already in glyphHeights, getHeight returns 0. 
> It can be:
> {code:java}
>     public float getHeight(int code) throws IOException
>     {
>         int cid = codeToCID(code);
>         float height = 0;
>         if (!glyphHeights.containsKey(cid))
>         {
>             height =  (float) getType2CharString(cid).getBounds().getHeight();
>             glyphHeights.put(cid, height);
>         } else {
>             height =  glyphHeights.get(cid);
>         }
>         return height;
>     }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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