ISO/IEC JTC 1/SC34 Nxxxx 

ISO/IEC JTC 1/SC34
Information technology --
Document Description and Processing Languages
TITLE:	Requirements for Amendment 2 to ISO/IEC 9541-3: additional shape representation for Open Font Format	
SOURCE:	SC34/WG2 Japan	
PROJECT:		
PROJECT EDITOR:		
STATUS:		
ACTION:		
DATE:	2007-12-05	
DISTRIBUTION:	SC34, SC34/WG2 and Liaisons	
REFER TO:		
REPLY TO:		

ISO/IEC JTC1/SC34/WG2 N0288
Requirements for Amendment 2 to ISO/IEC 9541-3: additional glyph shape representation for Open Font Format

Open Font Format (ISO/IEC 14496-22) is a standardization of proprietary font format specification: Microsoft OpenType version 1.4. The specification refers many proprietary de-facto standards. Therefore ISO/IEC 14496-22 is not self-standing font format specification. For example, there are 2 basic glyph shape representations in OpenType: sfnt TrueType (used in sfnt OpenType) and embedded Adobe CFF font (used in CFF OpenType). There is no existing standard to refer these glyph shape representations. Except of the harmonization between ISO/IEC 14496-22 and ISO/IEC 9541, sfnt OpenType and CFF OpenType are important font format in other international standards of digital document format: ISO/IEC 15930 (PDF/X), ISO/IEC 19005 (PDF/A) and other PDF-based document formats. The standardization of these missing parts in ISO/IEC 14496-22 is required.

In following, the expected tasks are summarized that current standards and proprietary specification cannot cover.

1. The standardization of Adobe Type2 CharStrings compatible glyph shape representation
ISO/IEC 9541-3 provides the glyph shape representation which is compatible with Adobe Type1 PostScript font (the glyph outline is described by Adobe Type1 CharStrings). In ISO/IEC 14496-22, the corresponding glyph outline description is Adobe CFF font format based on Adobe Type2 CharStrings. Adobe Type2 CharStrings is an extended version of Adobe Type1 CharStrings (most operators are upper-compatible, extra operators are added, and a few operators are deprecated). For the harmonization of ISO/IEC 14496-22 and ISO/IEC 9541-3, following tasks are required.
A)	The standardization of operator set for Adobe Type2 compatibility.
①	Exactly compatibility with Adobe Type2 CharStrings? Superset of ISO/IEC 9541-1 Type1 and Adobe Type2 CharStrings? Only the restriction of deprecated operators?
B)	The standardization of behaviour of Adobe Type2 CharString interpreter.
①	The behaviour of ISO/IEC 9541-3 Type1 glyph shape representation interpreter should be described.
②	In the specification of Adobe Type2 CharStrings, some behaviours of interpreter against invalid or reserved data.
C)	The definition of the interpreter’s behaviour for Adobe Type2 CharStrings when it receives ISO/IEC 9541-3 glyph shape representation.

2. The standardization of glyph shape representation in sfnt TrueType
Except of Adobe Type2 CharStrings, ISO/IEC 14496-22 permits to use sfnt TrueType glyph shape representations. There is no existing standard that can be a basis of sfnt TrueType glyph shape representation. It should be standardized as a main part of ISO/IEC 9541-3 by future amendment.
A)	The separation of glyph outlines description operator and hinting control operator.
The operators in sfnt TrueType can be classified into 2 groups: the operators to draw straight line or spline curve, and the operators to control the quantization of controle points for low resolution devices. The hinting technology in sfnt TrueType is specified in detail and it is patented in USA, and the genuine hinting does not provide the best legibility on some devices. Some rasterizers designed for specific device use different hinting methods. The outline description with sfnt TrueType hinting information is difficult to convert for other outline description (e.g. ISO/IEC 9541-3 Type 1). Considering these compatibility problems, it should be discussed that ISO/IEC 9541-3 extention to support sfnt TrueType must include the detailed specification of genuine hinting (it makes many sfnt TrueType rasterizer as "ISO/IEC 9541-3 incompatible"), or should include but with multiple implementation levels.
B)	The feature for glyph composition
In "glyf" table of sfnt TrueType font file, the glyph description procedure can refer other glyph descriptions by glyph index and apply an affine transformation on the description before rasterization. By this feature, sfnt TrueType font can omit the similar glyph description data among the composite glyphs (e.g. accented Latin alphabets). For this feature, there are several implementation levels in existing TrueType rasterizers which is summarized in following. It should be discussed when sfnt TrueType glyph description is standardized.
①	The implementation cannot refer other glyph description procedure.
②	The implementation cannot refer other glyph description procedure if it is composite glyph (the reference cannot be chained). Apple's TrueType specification defines so, but Microsoft specification and its duplication ISO/IEC 14496-22 have no such limitation.
③	The implementation cannot apply an affine transformation to referred glyph description procedure, or the applicable affine transformation is restricted (e.g. horizontal/vertical only and no slanting). For example, the transformation available in sfnt TrueType rasterizer on Windows 3.1 J had such restriction.

3.	The standardization of Adobe Compact Font Format
The original font format using Adobe Type2 CharStrings is not OpenType but Adobe Compact Font Format (CFF). As a result, CFF OpenType has a nested structure that OpenType font includes another self-contained font file in CFF format. CFF font file is not popular anymore, but the structure of CFF is essential to embed ISO/IEC 9541-3 Type 1 glyph procedures into ISO/IEC 14496-22 font file format, but ISO/IEC 14496-22 itself does not contain the file format specification which is compatible with Adobe CFF. A file format which is compatible with Adobe CFF is required to harmonize ISO/IEC 9541 to ISO/IEC 14496-22. However, it is arguable that a file format (excluding glyph description procedure) should be a part of ISO/IEC 9541-3.

4. The standardization of the sfnt TrueType interpreters' behaviour against wrong or invalid or inconsistent input
Followings are the popular problems distributed in current. Some implementation issues errors immediately, some implementation issues warning, some implementations ignores silently. The standard behaviours of sfnt TrueType interpreters are expected.
A)	In the original TrueType font specification, the character encodings were expected to be 8bit or 16bit. In the TrueType font (and ISO/IEC 14496-22), there is a 16bit entry to indicate the maximum character codepoint in "maxp" table. Some TrueType fonts put the value 0xFFFF even if its character encoding in "cmap" does not cover 0xFFFF.
B)	In "sfnt" table of TrueType font, all glyph description procedures are joined. The offset to each glyph description procedure is stored in "loca" table. To obtain a description procedure for glyph index i, the interpreter loads the offsets for glyph index i and i+1, and calculates the length of glyph description procedures. For the glyph index which no glyph description procedures in included in the font, the TrueType font specification specifies to store same offsets for i and i+1 that TrueType interpreters can compute the glyph description procedure is zero-sized. Some TrueType fonts store invalid offsets for such glyph index, e.g. 0x00000000 (causes rewinding error) or 0xFFFFFFFF (exceeds the limitation of font file size).
C)	TrueType font has a table "name" to store the string properties. If the encoding is not declared, the encoding should be US-ASCII, but some fonts use other encodings.