Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: openfont.h
Link against: N/A

Class TOpenFontFaceAttribBase

TOpenFontFaceAttribBase

Support

Supported from 5.0

Description

Font attribute base class.

This class is not intended for user derivation.

Defined in TOpenFontFaceAttribBase:
Anonymous, Coverage(), EArabicSet, EArmenianSet, EBengaliSet, EBold, ECJKSet, ECyrillicSet, EDevanagariSet, EGeorgianSet, EGreekSet, EGujuratiSet, EGurmukhiSet, EHangulJamoSet, EHangulSet, EHebrewSet, EItalic, EKanaSets, EKannadaSet, ELaoSet, ELatinSet, EMalayalamSet, EMonoWidth, ENameLength, EOriyaSet, ESerif, ESymbolSets, ETamilSet, ETeluguSet, EThaiSet, HasCJK(), HasCyrillic(), HasGreek(), HasHangul(), HasKana(), HasLatin(), IsBold(), IsItalic(), IsMonoWidth(), IsSerif(), IsSymbol(), Name(), SetBold(), SetCoverage(), SetItalic(), SetMonoWidth(), SetName(), SetSerif(), TOpenFontFaceAttribBase(), operator==()

See also:


Construction and destruction


TOpenFontFaceAttribBase()

TOpenFontFaceAttribBase();

Description

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.

[Top]


Test for supported languages


HasCJK()

TBool HasCJK() const;

Description

Tests for support of Chinese ideographic characters.

These are used in Chinese, Japanese and Korean.

Note:

Return value

TBool

ETrue if Chinese ideographs are supported.


HasCyrillic()

TBool HasCyrillic() const;

Description

Tests for support of Cyrillic characters.

Note:

Return value

TBool

ETrue if Cyrillic characters are supported.


HasGreek()

TBool HasGreek() const;

Description

Tests for support of Greek characters.

Note:

Return value

TBool

ETrue if Greek characters are supported.


HasHangul()

TBool HasHangul() const;

Description

Tests for support of Korean Hangul characters.

Korean may also make use of Chinese characters.

Note:

Return value

TBool

ETrue if Korean characters are supported

See also:


HasKana()

TBool HasKana() const;

Description

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:

Return value

TBool

ETrue if Japanese characters are supported

See also:


HasLatin()

TBool HasLatin() const;

Description

Tests for support of Latin characters.

Note:

Return value

TBool

ETrue if Latin characters are supported

[Top]


Query attributes


Coverage()

const TUint* Coverage() const;

Description

Gets a pointer to the 128-bit coverage bitmap.

Each bit in the bitmap represents a subset of Unicode that is supported. The mapping is defined in the TrueType documentation under the OS/2 table.

Note:

Return value

TUint*

A pointer to the 128-bit coverage bitmap. The coverage bitmap is an array of four 32-bit integers. When no information is available all four integers are zero.

See also:


IsBold()

TBool IsBold() const;

Description

Tests if the typeface is inherently bold.

Return value

TBool

ETrue if the typeface is inherently bold.


IsItalic()

TBool IsItalic() const;

Description

Tests if the typeface is inherently italic.

Return value

TBool

ETrue if the typeface is inherently italic.


IsMonoWidth()

TBool IsMonoWidth() const;

Description

Tests if all the characters have the same width.

Return value

TBool

ETrue if all the characters have the same width.


IsSerif()

TBool IsSerif() const;

Description

Tests if the typeface has serifs.

Return value

TBool

ETrue if the typeface has serifs.


IsSymbol()

TBool IsSymbol() const;

Description

Tests if the typeface contains symbols only.

Return value

TBool

ETrue if the typeface contains symbols only.


Name()

TPtrC Name() const;

Description

Gets the typeface's name.

Return value

TPtrC

Descriptor containing typeface name.

[Top]


Set attributes


SetBold()

void SetBold(TBool aBold);

Description

Sets the bold attribute.

Parameters

TBool aBold

The bold attribute takes this value — ETrue or EFalse.


SetCoverage()

void SetCoverage(TUint aCoverage0,TUint aCoverage1,TUint aCoverage2,TUint aCoverage3);

Description

Sets the coverage bitmap.

This is a 128-bit bitmap in which each bit represents a subset of Unicode that is supported by the typeface. The mapping is defined in the TrueType documentation under the OS/2 table.

Note:

Parameters

TUint aCoverage0

Bits 0-31 of the coverage bitmap.

TUint aCoverage1

Bits 32-63 of the coverage bitmap.

TUint aCoverage2

Bits 64-95 of the coverage bitmap.

TUint aCoverage3

Bits 96-127 of the coverage bitmap.


SetItalic()

void SetItalic(TBool aItalic);

Description

Sets the italic attribute.

Parameters

TBool aItalic

The italic attribute takes this value — ETrue or EFalse.


SetMonoWidth()

void SetMonoWidth(TBool aMonoWidth);

Description

Sets the mono-width attribute.

Parameters

TBool aMonoWidth

The mono-width attribute takes this value — ETrue or EFalse.


SetName()

void SetName(const TDesC& aName);

Description

Sets the name attribute.

Parameters

const TDesC& aName

Descriptor containing typeface name.


SetSerif()

void SetSerif(TBool aSerif);

Description

Sets the serif attribute.

Parameters

TBool aSerif

The serif attribute takes this value — ETrue or EFalse.

[Top]


Overloaded operators


operator==()

TInt operator==(const TOpenFontFaceAttribBase& aAttrib) const;

Description

Equality operator.

Compares this and a specified set of font attributes for equality.

Parameters

const TOpenFontFaceAttribBase& aAttrib

The font attributes to compare. This is an object of TOpenFontFaceAttribBase or derived class.

Return value

TInt

ETrue if the values are equal.

[Top]


Enumerations


Enum Anonymous

Anonymous

Description

Coverage values.

These are the same as the field ulUnicodeRange1 in the OS/2 table in TrueType fonts. Note that this list is incomplete; see the TrueType documentation for other values.

See also:

ELatinSet

Range of Unicode values for characters in set is 0000-007F.

EGreekSet

Range of Unicode values for characters in set is 0370-03FF.

ECyrillicSet

Range of Unicode values for characters in set is 0400-04FF

EArmenianSet

Range of Unicode values for characters in set is 0530-058F

EHebrewSet

Range of Unicode values for characters in set is 0590-05FF

EArabicSet

Range of Unicode values for characters in set is 0600-06FF

EDevanagariSet

Range of Unicode values for characters in set is 0900-097F

EBengaliSet

Range of Unicode values for characters in set is 0980-09FF

EGurmukhiSet

Range of Unicode values for characters in set is 0A00-0A7F

EGujuratiSet

Range of Unicode values for characters in set is 0A80-0AFF

EOriyaSet

Range of Unicode values for characters in set is 0B00-0B7F

ETamilSet

Range of Unicode values for characters in set is 0B80-0BFF

ETeluguSet

Range of Unicode values for characters in set is 0C00-0C7F

EKannadaSet

Range of Unicode values for characters in set is 0C80-0CFF

EMalayalamSet

Range of Unicode values for characters in set is 0D00-0D7F

EThaiSet

Range of Unicode values for characters in set is 0E00-0E7F

ELaoSet

Range of Unicode values for characters in set is 0E80-0EFF

EGeorgianSet

Range of Unicode values for characters in set is 10A0-10FF

EHangulJamoSet

Range of Unicode values for characters in set is 1100-11FF


Enum Anonymous

Anonymous

Description

Flags for character sets supported by the typeface.

These are the same as the field ulUnicodeRange2 in the OS/2 table in TrueType fonts. Note that this list is incomplete; see the TrueType documentation for other values.

ESymbolSets

EKanaSets

EHangulSet

ECJKSet


Enum Anonymous

Anonymous

Description

Attribute flags.

EBold

Weight > 500 in Windows terms.

EItalic

Italic or oblique — any forward slant.

ESerif

Characters have serifs.

EMonoWidth

All characters are the same width.


Enum Anonymous

Anonymous

Description

Typeface name length.

ENameLength

Maximum length of typeface names. We allow 32 for open fonts, but names that are compatible with old-style fonts are limited to 24.