- From: John Hudson <tiro@tiro.com>
- Date: Mon, 27 Jun 2011 17:19:51 -0700
- To: "www-font@w3.org" <www-font@w3.org>
A second contribution from Sairus, including Adobe's first draft of an 'SVG ' table proposal. JH -------- Original Message -------- Subject: RE: [OpenType] SVG Fonts inside of OpenType fonts? [Cross-post from www-font@w3.org] Date: Mon, 27 Jun 2011 23:39:39 +0000 From: Sairus Patel <sppatel@adobe.com> Reply-To: <opentype-migration-list@indx.co.uk> To: multiple recipients of OpenType What follows is Adobe's first draft on this which you could also forward. I haven't absorbed Adam's proposal yet, and so don’t know whether Adobe's proposal could benefit from something in that proposal.) Best, Sairus --- Draft 1 of Adobe's 'SVG ' table proposal (view with a monospaced font) --- [ NOTE: Tables with glyph descriptions in other media types, for example a 'SWF ' table, may be proposed in the future and may have the identical container structure of the 'SVG ' table, with the only difference being the format of the actual glyph descriptions. TODO: this data structure doesn't allow glyph definitions to be shared. If sharing is a requirement, we'll need to add explicit length fields. TODO: describe how to restrict the complexity of allowable SVG in these glyph definitions. ] SVG - The Scalable Vector Graphics Table This table associates some or all glyphs in the font with glyph definitions in the Scalable Vector Graphics (SVG) format. Color, animation, sound, or other multimedia facilities not available in CFF or TrueType glyph technologies may be incorporated in these glyph definitions. 'SVG ' is an optional table in the font. When it is present, it must be in addition to the usual CFF or TrueType glyph definitions, which could describe simple or preview versions of the SVG glyphs. SVG Table Format: Type Name Description ------- ----------------- ----------------------------------------------- USHORT majorVersion Major version (starting at 1). Set to 1. USHORT minorVersion Minor version (starting at 0). Set to 0. ULONG glyphCoverage Offset (relative to the start of the 'SVG ' table) to the glyph coverage table, which specifies all glyph IDs that have SVG glyph description data (static and/or animated) for this media type. See chapter "OpenType Layout Common Table Formats" for the definition of the Coverage table. ULONG indexOffset Offset (relative to the start of the 'SVG ' table) to the Media Index, which defines glyph data for this media type. ------- ----------------- ----------------------------------------------- The Media Index is a collection of glyph definitions, one static and one animated, for each glyph in the glyph coverage. Each glyph definition is a self-contained SVG (TODO: specify more precisely). These glyph definitions are accessed by an array of offsets into a data section. The offsets are relative to the start of the Media Index. A pair of offsets is specified for each glyph in the glyph coverage, the first indicating a glyph definition that is static (no animation is allowed), and the second a glyph definition that is animated. The offsets must be in ascending order with offset[n] <= offset[n+1]. The length of a glyph definition can be determined by subtracting its offset from the next offset in the offset array. An additional offset is added at the end of the offset array so that the length of the last glyph definition may be determined. Thus, there are glyphCount*2 + 1 entries in the offsets array. The first two entries are offsets for the first glyph in the coverage (static and animated), the next two entries are offsets for the second glyph in the coverage, and so on. A particular glyph definition, static or animated, may be omitted by having its computed length be zero: offset[n] == offset[n+1]. If neither glyph definition is provided, it is recommended that the glyph be omitted from the glyph coverage entirely. Media Index Format: Type Name Description -------- ----------------- ----------------------------------------------- USHORT glyphCount Number of glyph descriptions. Same as number of glyps in the glyphCoverage. USHORT offsetSize Size of offset array elements. Set to 2 or 4. If 2, offsets are USHORTs; if 4, offsets are ULONGs. USHORT offset Array of offsets with (glyphCount*2 + 1) or ULONG entries, relative to start of Media Index. For offset type, see offsetSize description above. BYTE data Glyph description data section. -------- ----------------- -----------------------------------------------
Received on Tuesday, 28 June 2011 00:20:22 UTC