org.extex.font.format.xtf.tables.tag
Class Tag

java.lang.Object
  extended by org.extex.font.format.xtf.tables.tag.Tag
Direct Known Subclasses:
FeatureTag, LanguageSystemTag, ScriptTag

public abstract class Tag
extends java.lang.Object

OpenType Layout Tag Registry.

The Tag Registry defines the OpenType Layout tags that Microsoft supports. OpenType Layout tags are 4-byte character strings that identify the scripts, language systems, features and baselines in a OpenType Layout font. The registry establishes conventions for naming and using these tags. Registered tags have a specific meaning and convey precise information to developers and text-processing clients of OpenType Layout. Microsoft encourages font developers to use registered tags to assure compatibility and ease of use across fonts, applications, and operating systems.

The following sections contain sample sets of commonly used tags for scripts, language systems, and baselines. Microsoft will supply a list of additional tags upon request. In addition, the Feature Tag section defines all the features and feature tags Microsoft has developed and registered to date, including descriptions of the functions of each feature.

All tags are 4-byte character strings composed of a limited set of ASCII characters in the 0x20-0x7E range. A script tag can consist of 4 or less lowercase letters. If a script tag consists of three or less lowercase letters, the letters are followed by the requisite number of spaces (0x20), each consisting of a single byte.

OpenType layout tag registry for:

Version:
$Revision: 7274 $
Author:
Michael Niedermair

Constructor Summary
protected Tag(RandomAccessR rar)
          Creates a new object.
protected Tag(java.lang.String name)
          Creates a new object.
 
Method Summary
protected static java.lang.String format(java.lang.String name)
          Format the tag name.
static Tag getInstance(java.lang.String name)
          Get a new Tag.
 java.lang.String getTag()
          Getter for tag.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

protected Tag(RandomAccessR rar)
       throws java.io.IOException
Creates a new object.

Parameters:
rar - The input.
Throws:
java.io.IOException - if a io-error occurred.

Tag

protected Tag(java.lang.String name)
Creates a new object.

Parameters:
name - The name of the tag.
Method Detail

format

protected static java.lang.String format(java.lang.String name)
Format the tag name.

Parameters:
name - The name.
Returns:
returns the formated (4 byte) name.

getInstance

public static Tag getInstance(java.lang.String name)
Get a new Tag.

The tag can be a ScriptTag, a FeatureTag, a LanguageSystemTag or null, if not found.

Parameters:
name - The name of the tag.
Returns:
Returns a new tag.

getTag

public java.lang.String getTag()
Getter for tag.

Returns:
the tag

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()