Adobe Tech Note #5148
Total Page:16
File Type:pdf, Size:1020Kb
SING Glyphlet Production: Tips, Tricks & Techniques Technical Note #5148 ADOBE SYSTEMS INCORPORATED Corporate Headquarters 345 Park Avenue San Jose, CA 95110-2704 August 2, 2006 © 2005, 2006 Adobe Systems Incorporated. All rights reserved. NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of the publisher. Any software referred to herein is furnished under license and may only be used or copied in accordance with the terms of such license. PostScript is a registered trademark of Adobe Systems Incorporated. All instances of the name PostScript in the text are references to the PostScript language as defined by Adobe Systems Incorporated unless otherwise stated. The name PostScript also is used as a product trademark for Adobe Systems’ implementation of the PostScript language interpreter. Except as otherwise stated, any reference to a “PostScript printing device,” “PostScript display device,” or similar item refers to a printing device, display device or item (respectively) that contains PostScript technology created or licensed by Adobe Systems Incorporated and not to devices or items that purport to be merely compatible with the PostScript language. Adobe, the Adobe logo, Acrobat, the Acrobat logo, Acrobat Capture, Acrobat Exchange, Distiller, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Mac OS is a trademark of Apple Computer, Inc., registered in the United States and other countries. OpenType and Windows are either registered trademarks or a trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights. Contents Introduction. 1 Conventions . 1 Glyphlet Types & Categories . 1 Glyphlets Based on Known Glyph Collection . 1 Glyphlets Beyond Known Glyph Collections. 2 Generic Glyphlets . 2 Tools . 2 Glyphlet Production . 2 Glyphlet Verification . 3 Source Fonts . 3 Handling and Specifying GID=0 . 3 Font Size Versus Speed . 4 XML Issues. 4 UTF-8 Encoding . 4 UTF-8 Encoding Versus Unicode Character XML References . 4 Unicode Character XML Reference Issues . 5 Minimal XML File . 5 Learning Through Example . 6 META Table—General Issues . 6 Non-BMP Code Points. 6 PUA Code Points . 6 Setting Permissions . 7 Glyphlet Naming Conventions . 7 Localized Menu Names . 8 OpenType Only . 8 Vertical Variants . 8 References to CIDs . 9 META Table—Specific Fields. 9 MojikumiX4051 (ID=0) . 9 UNIUnifiedBaseChars (ID=1) . 9 BaseFontName (ID=2). 10 Language (ID=3). 10 WritingScript (ID=8) . 11 StrokeCount (ID=10). 11 IndexingRadical (ID=11) . 11 August 2, 2006 i Contents RemStrokeCount (ID=12) . 11 DesignCategory (ID=15). 12 DesignWeight (ID=16) . 12 DesignWidth (ID=17) . 12 DesignAngle (ID=18) . 13 CIDBaseChars (ID=20) . 13 IsUpdatedGlyph (ID=21) . 13 VendorGlyphURI (ID=22) . 14 LocalizedInfo (ID=24) . 14 LocalizedBaseFontName (ID=25) . 15 ReadingString: GlyphName (ID=100) . 16 ReadingString: JapaneseYomi (ID=101). 16 ReadingString: JapaneseTranslit (ID=102) . 16 Additional ReadingString Fields (IDs 103 through 114) . 17 AltIndexingRadical Fields (IDs 200 through 202) . 17 AltLookup Fields (IDs 250 through 257) . 18 UNICODEproperty: GeneralCategory (ID=500) . 18 Additional UNICODEproperty Fields (IDs 501 through 505). 19 UNIDerivedByOpenType (ID=602). 19 UNIOpenTypeYields (ID=603) . 19 CIDDerivedByOpenType (ID=604). 20 CIDOpenTypeYields (ID=605) . 21 BASE Table Overrides . 21 User-defined & Vendor-specific Metadata . 21 ii August 2, 2006 1 SING Glyphlet Production 1.1 Introduction This tutorial is intended for font developers who plan to build SING glyphlets, and is specifically designed to provide tips, tricks, and techniques that go beyond the standard documentation and specifications, and in effect, offer a more easily understood interpretation of them. Note that this document is not a substitute for the standard documentation and specifications, but rather complements them. While this initial version is written in English, a Japanese translation is planned and forthcoming. Until the Japanese translation is available, please note that this English version was specifically written to be clear, concise, and easy to understand. If you find any errors or omissions in this Adobe Tech Note, please contact its author, Dr. Ken Lunde, at the following email address, in English or in Japanese: [email protected] 1.1.1 Conventions This document assumes that the Adobe-supplied cvt2sing tool is used for building glyphlets. It is available for a variety of platforms, such as Windows and Mac OS X. Unicode values are indicated through the use of the standard “U+” prefix notation, and does not imply a particular encoding. For example, U+0020 represents an ASCII “space,” U+4E00 represents the CJK Unified Ideograph that means one, and U+20000 represents the first character in Plane 2. 1.2 Glyphlet Types & Categories Glyphlets, in terms of the glyphs that they carry throughout the workflow, can be categorized in different ways, yet they are ways that are regular and predictable. Each category has different methods for constructing the metadata, in terms of its content. 1.2.1 Glyphlets Based on Known Glyph Collection Under some circumstances, a type foundry may wish to make the glyphs for some of their designs available as individual glyphlets, rather than issuing a complete font. In this case, the glyphlets can be from an established glyph collection, such as Adobe-Japan1-5 or Adobe- Japan1-6. Information stored in the ‘META’ table makes the relationship to a known glyph collection explicit. August 2, 2006 1 1 SING Glyphlet Production Tools 1.2.2 Glyphlets Beyond Known Glyph Collections For glyphs that are not found in known glyph collections—meaning that they are variants of glyphs in known glyph collections—or for glyphs of parent characters not covered by known glyph collections, glyphlets can be built to make these accessible by users through existing (installed) fonts or as separate glyphs. The metadata that is recorded in the ‘META’ table becomes critical in allowing users to enter the glyphs into their documents. The more rich the metadata, the greater the ease in which users can enter the glyphs. 1.2.3 Generic Glyphlets Generic glyphs, whether they are considered variants of glyphs in known glyph collections, or beyond the scope of those glyph collections, benefit from an adequate amount of metadata to allow users to enter them into their documents. Corporate logos are but a single example of a generic glyphlet. 1.3 Tools A variety of tools can be used to create and verify glyphlets. The tools supplied by Adobe are generally cross-platform, and will run on Mac OS X and Windows. Always be sure that you are using the latest version of these tools, to ensure that the best possible glyphlets are being built. Also ensure that you are using the latest version of the specifications. 1.3.1 Glyphlet Production The cvt2sing tool is the general-purpose glyphlet production tool. There are two modes available. One is single-glyphlet mode, meaning that a single execution builds a single glyphlet, specifying parameters on the command line. The other is batch mode, in which a single file serves as input to cvt2sing, each line of which contains the parameters for building a single glyphlet. The following command lines build two glyphlets, using CID 23056 and 23057 of R.cff as the source font, and using the ADBE_KozMin-R_C23056.xml and ADBE_KozMin- R_C23057.xml files as metadata, respectively: % cvt2sing -g /23056 -m XML/ADBE_KozMin-R_C23056.xml -dd ./GAI R.cff % cvt2sing -g /23057 -m XML/ADBE_KozMin-R_C23057.xml -dd ./GAI R.cff The following command line builds the same glyphlets, but uses batch mode: % cvt2sing -s R.txt The following lines represent the contents of the R.txt file: 2 August 2, 2006 SING Glyphlet Production 1 Source Fonts -g /23056 -m XML/ADBE_KozMin-R_C23056.xml -dd ./GAI R.cff -g /23057 -m XML/ADBE_KozMin-R_C23057.xml -dd ./GAI R.cff 1.3.2 Glyphlet Verification Besides using the glyphlets within a workflow, or with applications that are SING-savvy, two Adobe-supplied tools are useful for inspecting the contents of glyphlets. The OTFProof tool allows any ‘sfnt’ table to be viewed, usually in human-readable form, and often in more than one way. The tx tool can be used to inspect the ‘CFF’ tables of glyphlets, and can also be used to subset the source fonts, which is a technique for increasing the speed at which cvt2sing runs. This technique is described elsewhere in this document. 1.4 Source Fonts There are several factors to consider when preparing the source fonts, specifically the fonts from which cvt2sing extracts the glyphs for building glyphlet files. Note that if a CIDFont file or a CID-keyed OpenType font is used as the source font for glyphlets, whatever glyph collection designation (/Registry, /Ordering, and /Supplement, such as “Adobe-Japan1-6”) that the source font advertises will be flattened to become “Adobe- Identity-0” in the glyphlet’s ‘CFF’ table. Adobe-Identity-0 is a language- and script- independent glyph collection designation. If a name-keyed font is used as the source font, no glyph collection designation will be advertised in the resulting glyphlet’s ‘CFF’ table. 1.4.1 Handling and Specifying GID=0 GID=0 in a glyphlet file is extracted from the source font.