TOpenFontFaceAttribBase Class Reference

class TOpenFontFaceAttribBase

Font attribute base class.

This class is not intended for user derivation.

TOpenFontFaceAttrib TOpenFontSpec

Public Member Functions
TOpenFontFaceAttribBase()
const TUint *Coverage()
TBool HasCJK()
TBool HasCyrillic()
TBool HasGreek()
TBool HasHangul()
TBool HasKana()
TBool HasLatin()
TBool IsBold()
TBool IsItalic()
TBool IsMonoWidth()
TBool IsSerif()
TBool IsSymbol()
TPtrC Name()
voidSetBold(TBool)
voidSetCoverage(TUint, TUint, TUint, TUint)
voidSetItalic(TBool)
voidSetMonoWidth(TBool)
voidSetName(const TDesC &)
voidSetSerif(TBool)
TBool operator==(const TOpenFontFaceAttribBase &)
Public Member Enumerations
enumanonymous {
ELatinSet = 0x1, EGreekSet = 0x80, ECyrillicSet = 0x200, EArmenianSet = 0x400, EHebrewSet = 0x800, EArabicSet = 0x2000, EDevanagariSet = 0x8000, EBengaliSet = 0x10000, EGurmukhiSet = 0x20000, EGujuratiSet = 0x40000, EOriyaSet = 0x80000, ETamilSet = 0x100000, ETeluguSet = 0x200000, EKannadaSet = 0x400000, EMalayalamSet = 0x800000, EThaiSet = 0x1000000, ELaoSet = 0x2000000, EGeorgianSet = 0x8000000, EHangulJamoSet = 0x10000000
}
enumanonymous { ESymbolSets = 0xFFFE, EKanaSets = 0x60000, EHangulSet = 0x100000, ECJKSet = 0x8000000 }
enumanonymous { EBold = 0x1, EItalic = 0x2, ESerif = 0x4, EMonoWidth = 0x8 }
enumanonymous { ENameLength = 32 }
Protected Attributes
TUint iCoverage
TBufC< ENameLength >iName
TInt32 iReserved
TInt iStyle

Constructor & Destructor Documentation

TOpenFontFaceAttribBase()

TOpenFontFaceAttribBase()[inline]

Default C++ constructor.

This sets all attribute fields to zero. As for other T classes, there is no need to explicitly clean-up objects derived from this class.

Member Functions Documentation

Coverage()

const TUint *Coverage()const [inline]

Gets a pointer to the sets of flags that indicate the font's Unicode coverage.

Each flag that is set represents a supported Unicode range. The mapping is defined in the TrueType documentation under the OS/2 table.

Note: Some useful subsets are defined as anonymous enumerated constants at the end of this class, see ELatinSet etc.

SetCoverage()

HasCJK()

TBool HasCJK()const [inline]

Tests for support of Chinese ideographic characters.

These are used in Chinese, Japanese and Korean.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

HasCyrillic()

TBool HasCyrillic()const [inline]

Tests for support of Cyrillic characters.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

HasGreek()

TBool HasGreek()const [inline]

Tests for support of Greek characters.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

HasHangul()

TBool HasHangul()const [inline]

Tests for support of Korean Hangul characters.

Korean may also make use of Chinese characters.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

HasCJK()

HasKana()

TBool HasKana()const [inline]

Tests for support of Japanese syllabic characters.

This function tests for the presence of Hiragana and Katakana syllabic characters in the font, collectively called kana. These characters are not sufficient for the Japanese language, which also makes use of Chinese characters.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

HasCJK()

HasLatin()

TBool HasLatin()const [inline]

Tests for support of Latin characters.

Note: A return value of ETrue implies that the font has a usable set of characters. It does not imply exhaustive coverage.

IsBold()

TBool IsBold()const [inline]

Tests if the typeface is inherently bold.

IsItalic()

TBool IsItalic()const [inline]

Tests if the typeface is inherently italic.

IsMonoWidth()

TBool IsMonoWidth()const [inline]

Tests if all the characters have the same width.

IsSerif()

TBool IsSerif()const [inline]

Tests if the typeface has serifs.

IsSymbol()

TBool IsSymbol()const [inline]

Tests if the typeface contains symbols only.

Name()

TPtrC Name()const [inline]

Gets the typeface's name.

SetBold(TBool)

voidSetBold(TBoolaBold)[inline]

Sets the bold attribute.

Parameters

TBool aBoldThe bold attribute takes this value: ETrue or EFalse.

SetCoverage(TUint, TUint, TUint, TUint)

voidSetCoverage(TUintaCoverage0,
TUintaCoverage1 = 0,
TUintaCoverage2 = 0,
TUintaCoverage3 = 0
)[inline]

Sets the coverage flags.

The flags are held in four 32 bit integers. Each flag that is set represents a range of Unicode characters that is supported by the typeface: Latin, Greek, Cyrillic etc. The mapping is defined in the TrueType documentation under the OS/2 table.

Note: Some useful subsets are defined as anonymous enumerated constants at the end of this class, see ELatinSet etc.

Parameters

TUint aCoverage0The first set of coverage flags (bits 0-31).
TUint aCoverage1 = 0The second set of coverage flags (bits 32-63).
TUint aCoverage2 = 0The third set of coverage flags (bits 64-95).
TUint aCoverage3 = 0The fourth set of coverage flags (bits 96-127).

SetItalic(TBool)

voidSetItalic(TBoolaItalic)[inline]

Sets the italic attribute.

Parameters

TBool aItalicThe italic attribute takes this value ETrue or EFalse.

SetMonoWidth(TBool)

voidSetMonoWidth(TBoolaMonoWidth)[inline]

Sets the mono-width attribute.

Parameters

TBool aMonoWidthThe mono-width attribute takes this value: ETrue or EFalse.

SetName(const TDesC &)

voidSetName(const TDesC &aName)[inline]

Sets the name attribute.

Parameters

const TDesC & aNameDescriptor containing typeface name.

SetSerif(TBool)

voidSetSerif(TBoolaSerif)[inline]

Sets the serif attribute.

Parameters

TBool aSerifThe serif attribute takes this value ETrue or EFalse.

operator==(const TOpenFontFaceAttribBase &)

TBool operator==(const TOpenFontFaceAttribBase &aAttrib)const [inline]

Equality operator.

Compares this and a specified set of font attributes, including the coverage and the typeface name.

In version 6.1, and earlier, the return value was TInt.

Parameters

const TOpenFontFaceAttribBase & aAttribThe font attributes to compare. This is an object of TOpenFontFaceAttribBase or of a derived class.

Member Enumerations Documentation

Enum anonymous

Enumerators

ELatinSet = 0x1
EGreekSet = 0x80
ECyrillicSet = 0x200
EArmenianSet = 0x400
EHebrewSet = 0x800
EArabicSet = 0x2000
EDevanagariSet = 0x8000
EBengaliSet = 0x10000
EGurmukhiSet = 0x20000
EGujuratiSet = 0x40000
EOriyaSet = 0x80000
ETamilSet = 0x100000
ETeluguSet = 0x200000
EKannadaSet = 0x400000
EMalayalamSet = 0x800000
EThaiSet = 0x1000000
ELaoSet = 0x2000000
EGeorgianSet = 0x8000000
EHangulJamoSet = 0x10000000

Enum anonymous

Enumerators

ESymbolSets = 0xFFFE
EKanaSets = 0x60000
EHangulSet = 0x100000
ECJKSet = 0x8000000

Enum anonymous

Enumerators

EBold = 0x1
EItalic = 0x2
ESerif = 0x4
EMonoWidth = 0x8

Enum anonymous

Enumerators

ENameLength = 32

Member Data Documentation

TUint iCoverage

TUint iCoverage[protected]

TBufC< ENameLength > iName

TBufC< ENameLength >iName[protected]

TInt32 iReserved

TInt32 iReserved[protected]

TInt iStyle

TInt iStyle[protected]