Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 585A4200D38 for ; Sun, 12 Nov 2017 13:46:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 57275160BF0; Sun, 12 Nov 2017 12:46:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9D76E160BD7 for ; Sun, 12 Nov 2017 13:46:49 +0100 (CET) Received: (qmail 7767 invoked by uid 500); 12 Nov 2017 12:46:48 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 7755 invoked by uid 99); 12 Nov 2017 12:46:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Nov 2017 12:46:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 61832C4F72 for ; Sun, 12 Nov 2017 12:46:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=madlon-kay.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id sJaS0oV8PaS2 for ; Sun, 12 Nov 2017 12:46:45 +0000 (UTC) Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 521B05FAF7 for ; Sun, 12 Nov 2017 12:46:44 +0000 (UTC) Received: by mail-pf0-f170.google.com with SMTP id 17so9930542pfn.12 for ; Sun, 12 Nov 2017 04:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=madlon-kay.com; s=google; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=razBj8IlxVgCHle8jVDNdtiU4uKXJs7DvLbzyL8+MaY=; b=Yfu/GOP8O4bbhxO4E6qe7YpxCepYwKGuoIrQawl1bIg9BqIPgqc0TzaFroY8R2jnvE Nq8Iugkh70I4uxPec1kYjWHVyErSBtw+K4MOMa/FnFTQeuqu3MjbAsOfQ9B2fOn9z8kG BB1W/Bg+mTZ8kNHoiRaduCe3qP+t/2n6qixuk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=razBj8IlxVgCHle8jVDNdtiU4uKXJs7DvLbzyL8+MaY=; b=HZejKy1RomToxI/aeaQuPg5eRep4r0MrpOnnJCwFaX/0ptER2P5P0SVV8JTEQyUWoG vY9PO2n31HFhSWktp9H7fAlgISYhWdRYx8rgD/cMy1kAWnG2Ug8OCNEAC94IYHTjzHQq V8WdkQoZP6Zk3/Mft9AsiFtv6geICy1ZaJm9rGbZr5xfJleGzkZQieigpKsO8MwG+K9X 0TTgBEV0q/w+npx9BuqD+iRSuyJfLSFz8f/Ji1Y3Ey1CyUk4GYUvdK4dTe62PoP5M92L 6ij6WR4aKZWDiUIHU9C/00qmqit7zyFvJUQUoXqeWN/E9plU83FPZB4jBaIzfHrHUY1+ z4cQ== X-Gm-Message-State: AJaThX4JVs85oqqUbtkuf1qTC0gZ/2NfNee2IKhk/lHCR7bmWmNrAMcL mjeGOviiOaFnkAVj+ap0uQ8K24JShZI= X-Google-Smtp-Source: AGs4zMbnmuwrb0cQhHntNMHzYkK9CtFHMiA6edISgFLs1aHEdv+aw3siHJBpQSJZJYctplfa/aC8Ug== X-Received: by 10.101.64.70 with SMTP id h6mr5831741pgp.144.1510490802370; Sun, 12 Nov 2017 04:46:42 -0800 (PST) Received: from [192.168.11.126] (p705107-ipngn8501hodogaya.kanagawa.ocn.ne.jp. [114.145.56.107]) by smtp.gmail.com with ESMTPSA id q70sm32284611pfj.39.2017.11.12.04.46.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 04:46:41 -0800 (PST) From: Aaron Madlon-Kay Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: Creating vertical text Date: Sun, 12 Nov 2017 21:46:37 +0900 References: <3723506D-D663-4EB6-832F-AC052EDC230B@madlon-kay.com> To: users@pdfbox.apache.org In-Reply-To: <3723506D-D663-4EB6-832F-AC052EDC230B@madlon-kay.com> Message-Id: <6B56DF9E-F9F4-413F-B104-0B6132D41987@madlon-kay.com> X-Mailer: Apple Mail (2.3445.4.7) archived-at: Sun, 12 Nov 2017 12:46:50 -0000 I received some spot-on advice from PDFBox contributor John Hewson, so I = wanted to share it in case anyone else has the same issue: > John Hewson wrote: >=20 > =E2=80=A6 >=20 > First of all, Identity-V seems like the right approach. PDFBox should = be able to handle the basics of vertical text layout using that. = However, as you say advanced OpenType features such as GSUB are not = supported in PDFBox. That=E2=80=99s because OpenType is not supported in = PDF* as it=E2=80=99s too new. So it=E2=80=99s up to the program/library = which generates the PDF to apply the positioning or substitution itself = and place the correct glyph on the page. PDFBox doesn=E2=80=99t = implement that functionality, because it=E2=80=99s pretty complex - = though we=E2=80=99d certainly like to! >=20 > * not entirely true, but PDF viewers have very limited support for it. >=20 > The way OpenType Layout works is that there are various abstract = "features=E2=80=9D which are identified by =E2=80=9Ctags=E2=80=9D such = as =E2=80=9Cvert=E2=80=9D. These are simply used as keys to turn on/off = various positioning or substitutions, which can be found in the GSUB and = GPOS tables, respectively. So when an application wants, say, the = vertical version of a font, it enables the =E2=80=9Cvert=E2=80=9D = feature by applying all the relevant substitutions/positionings. This = could be as simple as a substitution rule which switches a horizontal = glyph for a vertical one, or a complex state machine for some Indic = language. In the case of =E2=80=9Cvert=E2=80=9D, it=E2=80=99s going to = be the former. >=20 > Given that GSUB and GPOS support are not coming to PDFBox anytime soon = and assuming that you are just wanting to use a limited set of vertical = fonts then I=E2=80=99d recommend =E2=80=9Cfreezing=E2=80=9D the = =E2=80=9Cvert=E2=80=9D feature into the font. This means creating a = special subset of the font which already has the positioning and = substitutions applied to the glyphs themselves. The resulting font = won=E2=80=99t have any need for GSUB or GPOS tables for =E2=80=9Cvert=E2=80= =9D any more, and will only support vertical writing. You can find a = tool for generating such fonts here: = https://github.com/twardoch/fonttools-utils/tree/master/pyftfeatfreeze >=20 > For debugging, if you=E2=80=99re looking for a tool to inspect the = table inside fonts, I recommend the free DTL OTMaster Light available = here: http://fontmaster.nl, Microsoft=E2=80=99s OpenType spec is also = helpful: = https://www.microsoft.com/en-us/Typography/OpenTypeSpecification.aspx --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org