Aaron Madlon-Kay created PDFBOX-4106:

             Summary: Vertical text creation
                 Key: PDFBOX-4106
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4106
             Project: PDFBox
          Issue Type: New Feature
          Components: FontBox, Parsing, Writing
            Reporter: Aaron Madlon-Kay
         Attachments: 0001-Parse-GSUB-table.patch, 
sample_code.txt, vertical.pdf

I needed to output vertical Japanese text, but was stymied by several 
* No API to load a TTF as Identity-V encoding
* No support for 'vert' glyph substitution
* No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but not 
used at all)

I have attached a series of patches that implement the above features. 
* The GSUB glyph substitution table is parsed (limitation: type 1 lookups only; 
this is sufficient for many features including 'vert'/'vrt2' vertical glyph 
* Cmap lookup makes use of GSUB when features are enabled on a TTF
* 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and are 
embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
* An API has been added for loading a TTF as a vertical font, setting 
Identity-V encoding and enabling 'vert'/'vrt2' substitution

Each patch could approximately be split out into a separate ticket, if desired.

Also attached is some sample code that exercises these patches and illustrates 
the effect of vertical glyph positioning. The sample output PDF is also 

This message was sent by Atlassian JIRA

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

Reply via email to