You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Villu Ruusmann (JIRA)" <ji...@apache.org> on 2009/10/17 08:45:31 UTC

[jira] Created: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Support for Adobe CFF/Type2 fonts
---------------------------------

                 Key: PDFBOX-542
                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
             Project: PDFBox
          Issue Type: New Feature
          Components: FontBox, PDModel
    Affects Versions: 0.8.0-incubator
            Reporter: Villu Ruusmann


PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).

I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.

Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).

The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler reassigned PDFBOX-542:
-----------------------------------------

    Assignee: Andreas Lehmkühler

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766863#action_12766863 ] 

Villu Ruusmann commented on PDFBOX-542:
---------------------------------------

A few technical observations regarding java.awt.Font#createFont(int, InputStream) that might come in handy for other Type1 font developers.

Line terminators must be UNIX-style '\n'. For example, one cannot use java.io.PrintStream#println for outputting lines of text, because it emits different line terminators on different platforms. This is issue #6609143 in Java Bug Database:
http://bugs.sun.com/view_bug.do?bug_id=6609143

Glyph names must conform to standard encoding(?). java.awt.Graphics#drawString will not paint a glyph whose name is non-conforming. For example, "zero", "colon", "a" and "A" are all valid glyph names, while "Zcaron", "H22107" and "pi121" are not. The solution is to rename the latter to Unicode glyph names "uniXXXX", where XXXX is the hexadecimal value of the glyph code.


> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767219#action_12767219 ] 

Andreas Lehmkühler commented on PDFBOX-542:
-------------------------------------------

Sounds really interesting. I'll have a deeper look at it in a few days.

For now, thanks for the contribution!!

Is it possible to add the mentioned pdf as well?

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment: pdfbox-r823839.patch
                fontbox-r818793.patch

Patch files against the head revisions of trunk branches as of October 16, 2009.

The code makes use of Java 1.5 language features, which is in conflict with current FontBox/PDFBox project style.

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766847#action_12766847 ] 

Villu Ruusmann commented on PDFBOX-542:
---------------------------------------

The idea of converting Adobe CFF/Type2 fonts to PostScript Type1 fonts has been aired before:
http://www.mail-archive.com/pdfbox-dev@incubator.apache.org/msg01674.html

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment: with-cff.png
                without-cff.png

Captured the output of org.apache.pdfbox.pdfviewer.PageDrawer before (without-cff.png) and after (with-cff.png) applying the patches. 

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment: pdfbox-r823839.patch
                fontbox-r818793.patch

Replaced old patch files with new ones.

A number of edge and corner cases have been identified and resolved while testing against an extended set of PDF documents.

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783479#action_12783479 ] 

Andreas Lehmkühler commented on PDFBOX-542:
-------------------------------------------

I've ran a first test and it looks quite good....

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment: pdfbox-r823839.patch

Fixed the way how a Type1C font program's built-in encoding is overridden by an Encoding entry in the PDF font dictionary.

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, pdfbox-r823839.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment:     (was: fontbox-r818793.patch)

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment:     (was: pdfbox-r823839.patch)

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: fontbox-r818793.patch, with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-542) Support for Adobe CFF/Type2 fonts

Posted by "Villu Ruusmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Villu Ruusmann updated PDFBOX-542:
----------------------------------

    Attachment:     (was: pdfbox-r823839.patch)

> Support for Adobe CFF/Type2 fonts
> ---------------------------------
>
>                 Key: PDFBOX-542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-542
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>    Affects Versions: 0.8.0-incubator
>            Reporter: Villu Ruusmann
>            Assignee: Andreas Lehmkühler
>         Attachments: with-cff.png, without-cff.png
>
>
> PDFBox should support embedded font types, most prominently the Adobe CFF/Type2 (aka Type1C) font type. The desired functionality includes both glyph metrics (for PDF text extraction using org.apache.pdfbox.util.PDFTextStripper) and glyph painting (for PDF rendering using org.apache.pdfbox.pdfviewer.PageDrawer).
> I have implemented the basics of Adobe CFF/Type2 font specification. If the other project members find my work substantial, I would like to see it incorporated into FontBox/PDFBox projects. Please see the attached patch files.
> Design considerations. A PDF FontFile3 stream can be parsed into CFFFont objects by class CFFParser. CFFFont contains a map of glyph names to Type2 charstrings, which can be converted to Type1 charstrings by class CharStringConverter and rendered by class CharStringRenderer. Glyph metrics is attained by formatting the result as AFM by class AFMFormatter, which plugs nicely with existing PDFBox infrastructure. Glyph painting is attained by formatting the result as PostScript Type1 font by class Type1FontFormatter, which can be loaded via java.awt.Font#createFont(int, InputStream).
> The current implementation does not support synthetic CFF fonts nor CID-keyed CFF fonts. Also, the conversion of certain Type2 features (stemming, hinting, flex) is missing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.