Hello. I’m attempting to use PDFBox to create a PDF with vertical Japanese text. I understand that PDFBox doesn’t support this out of the box, so depending on the scope of the missing functionality I may try to implement it myself. If the dev ML is more appropriate for this, please let me know.
I have obtained 90% of what I want by forcing my font to be loaded as Identity-V rather than Identity-H: this successfully makes the text render vertically. In particular I am referring to supplying COSName.IDENTITY_V in place of IDENTITY_H on this line: https://github.com/apache/pdfbox/blob/f548ef7ea50f8e60685f5461ed4504751f766c4b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2Embedder.java#L73 The remaining 10% is that vertical glyphs are not used when appropriate: for instance U+30FC is a horizontal line normally, but has a vertical alternative glyph. I understand that the association between default and vertical glyphs is stored in the ‘vert’ subtable of the GSUB table. My question: What do I need to do to get the ‘vert’ glyphs used as appropriate? Do I need to parse the table and do the pivoting myself when writing out the PDF? Or am I simply missing some bit of metadata about the embedded font that should be there? Additional details: - The font I’m using is IPA Gothic (TTF version): http://ipafont.ipa.go.jp/old/ipafont/download.html#en - A sample output with incorrect horizontal glyphs: https://drive.google.com/file/d/0B5OoSoZGclLTVUpyMUY3WnU5RDg/view?usp=sharing - The horizontal line characters (U+2015, U+30FC) are incorrect and should be vertical. Yes, I have confirmed in e.g. FontForge that the font has ‘vert’ substitutions for these characters. - The sample is large (4.4 MB) because the entire font is embedded, just to illustrate that the problem isn’t(?) due to subsetting - I’m working off of trunk, r1813370 / cd71c32b Thank you for any advice you can offer. -Aaron --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

