Carbon


Character Type Field Masks

Header: Script.h

enum {
    smcTypeMask = 15,
    smcReserved = 240,
    smcClassMask = 3840,
    smcOrientationMask = 4096,
    smcRightMask = 8192,
    smcUpperMask = 16384,
    smcDoubleMask = 32768
};

Constant descriptions

smcTypeMask

Character-type mask.

smcReserved

Reserved.

smcClassMask

Character-class mask.

smcOrientationMask

Character orientation (2-byte scripts).

smcRightMask

Writing direction (bidirectional scripts)

Main character set or subset (2-byte scripts)

smcUpperMask

Uppercase or lowercase.

smcDoubleMask

Size (1 or 2 bytes).

These bit masks are used to extract fields from the return value of the CharacterType function.

The character type of the character in question is the result of performing an AND operation with smcTypeMask and the CharacterType result.

The character class of the character in question is the result of performing an AND operation with smcClassMask and the CharacterType result. Character classes can be considered as subtypes of character types.

The orientation of the character in question is the result of performing an AND operation with smcOrientationMask and the CharacterType result. The orientation value can be either smCharHorizontal or smCharVertical.

The direction of the character in question is the result of performing an AND operation with smcRightMask and the CharacterType result. The direction value can be either smCharLeft (left-to-right) or smCharRight (right-to-left).

The case of the character in question is the result of performing an AND operation with smcUpperMask and the CharacterType result. The case value can be either smCharLower or smCharUpper.

The size of the character in question is the result of performing an AND operation with smcDoubleMask and the CharacterType result. The size value can be either smChar1byte or smChar2byte.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)