pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkühler (JIRA) <j...@apache.org>
Subject [jira] Commented: (PDFBOX-542) Support for Adobe CFF/Type2 fonts
Date Mon, 08 Feb 2010 21:37:30 GMT

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

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

I've added the pdfbox part with version 907804.

I've replaced the copyright notice with the ASF license as discussed. Villus name retained
as author. I've also added a lot of javadocs ...

The hudson build revealed a Java 6 dependency in FontBox:

[INFO] Compilation failure
.../src/main/java/org/apache/fontbox/cff/CharStringRenderer.java:[122,12]
moveTo(float,float) in java.awt.geom.GeneralPath cannot be applied to
(double,double)
.../src/main/java/org/apache/fontbox/cff/CharStringRenderer.java:[129,12]
lineTo(float,float) in java.awt.geom.GeneralPath cannot be applied to
(double,double)

We should fix that before the next release.

> 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.


Mime
View raw message