EPOC   SDK Home Glossary Indexes Previous Next Up

TOpenFontFaceAttribBase class


Contents


TOpenFontFaceAttribBase class — Base class for font attributes

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

TOpenFontFaceAttribBase

Stores typeface attributes.

Defined in

openfont.h

Link against

N/A

Description

The class is the base class for TOpenFontFaceAttrib and TOpenFontSpec.

Writing derived classes

This class is not intended for user derivation


Construction and destruction

Constructor zeros all fields. As for other T classes, there is no need to explicitly clean-up objects derived from TOpenFontFaceAttribBase.


Functions to test for supported languages

Note that a return value of TRUE from functions in this section implies that the font has a usable set of characters in the selected set. It does not imply exhaustive coverage.


HasLatin() — Check for Latin character support

inline TBool HasLatin() const;

Description

Checks for support of Latin characters in the font.

Return value

TBool

TRUE if Latin characters are supported


HasGreek() — Check for Greek character support

inline TBool HasGreek() const;

Description

Checks for support of Greek characters in the font.

Return value

TBool

TRUE if Greek characters are supported


HasCyrillic() — Check for Cyrillic character support

inline TBool HasCyrillic() const;

Description

Checks for support of Cyrillic characters in the font.

Return value

TBool

TRUE if Cyrillic characters are supported


HasKana() — Check for Japanese character support

inline TBool HasKana() const;

Description

Checks for support of Japanese syllabic characters in the font. This function checks for the presence of Hiragana and Katakana syllabic characters, collectively called kana. These characters are not sufficient for the Japanese language, which also makes use of Chinese characters: see HasCJK().

Return value

TBool

TRUE if Japanese characters are supported


HasHangul() — Check for Korean character support

inline TBool HasHangul() const;

Description

Checks for support of Korean Hangul characters in the font. Korean may also make use of Chinese characters: see HasCJK().

Return value

TBool

TRUE if Korean characters are supported


HasCJK() — Check for Chinese character support

inline TBool HasCJK() const;

Description

Checks for support of Chinese ideographs used in Chinese, Japanese and Korean.

Return value

TBool

TRUE if Chinese ideographs are supported


Attribute Query Functions


IsSymbol() — Check if typeface contains symbols only

TBool IsSymbol() const;

Description

Checks if the typeface contains symbols only.

Return value

TBool

TRUE if the typeface contains symbols only


IsBold() — Check if typeface is inherently bold

TBool IsBold() const;

Description

Checks if the typeface is inherently bold..

Return value

TBool

TRUE if the typeface is inherently bold


IsItalic() — Check if typeface is inherently italic

TBool IsItalic() const;

Description

Checks if the typeface is inherently italic.

Return value

TBool

TRUE if the typeface is inherently italic


IsSerif() — Check if typeface has serifs

TBool IsSerif() const;

Description

Checks if the typeface has serifs.

Return value

TBool

TRUE if the typeface has serifs


IsMonoWidth() — Check if all characters are the same width

TBool IsMonoWidth() const;

Description

Checks if all the characters have the same width.

Return value

TBool

TRUE if all the characters have the same width


Name() — Gets the typeface name

TPtrC Name() const;

Description

Returns the name of the typeface.

Return value

TPtrC

Descriptor containing typeface name


Coverage() — Get pointer to the coverage bitmap

const TUint* Coverage() const;

Description

Returns a pointer to the 128-bit coverage bitmap (each bit represents a subset of Unicode  — as defined in the TrueType documentation under the OS/2 table). The coverage bitmap is an array of 4 32-bit integers. Each bit that is set represents a particular subset of Unicode that is supported. When no information is available all four integers are zero.

Note: Some useful values are defined as constants in this class.

Return value

TUint*

a pointer to the 128-bit coverage bitmap.


Attribute modifier functions


SetName() — Set the name attribute

void SetName(const TDesC& aName);

Description

Sets the name attribute

Arguments

const TDesC& aName

Descriptor containing typeface name


SetCoverage() — Set the coverage

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

Description

Sets the coverage attribute.

Arguments

TUint aCoverage0

bits 0-31

TUint aCoverage1 = 0

bits 32-63

TUint aCoverage2 = 0

bits 64-95

TUint aCoverage3 = 0

bits 96-127


SetBold() — Set the bold attribute

void SetBold(TBool aBold);

Description

Set the bold attribute to the value of the argument aBold.

Arguments

TBool aBold

The bold attribute takes the value of aBold.


SetItalic() — Set the bold attribute

void SetItalic(TBool aItalic);

Description

Set the italic attribute to the value of the argument aItalic.

Arguments

TBool aItalic

The italic attribute takes the value of aItalic.


SetSerif() — Set the serif attribute

void SetSerif(TBool aSerif);

Description

Set the serif attribute to the value of the argument aSerif.

Arguments

TBool aSerif

The serif attribute takes the value of aSerif.


SetMonoWidth() — Set the mono-width attribute

void SetMonoWidth(TBool aMonoWidth);

Description

Set the mono-width attribute to the value of the argument aMonoWidth.

Arguments

TBool aMonoWidth

The mono-width attribute takes the value of aMonoWidth.


Overloaded operators


operator==() — Equality operator

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

Description

Compares for equality

Arguments

const TOpenFontFaceAttribBase& aAttrib

object of TOpenFontFaceAttribBase or derived class.

Return value

TInt

Returns 0 if the values are equal


Enumerations


Anonymous enum — Unicode ranges for iCoverage[0]

Enumeration for Languages

Range of unicode values for characters in set

ELatinSet = 0x1

0000-007F

EGreekSet = 0x80

0370-03FF

ECyrillicSet = 0x200

0400-04FF

EArmenianSet = 0x400

0530-058F

EHebrewSet = 0x800

0590-05FF

EArabicSet = 0x2000

0600-06FF

EDevanagariSet = 0x8000

0900-097F

EBengaliSet = 0x10000

0980-09FF

EGurmukhiSet = 0x20000

0A00-0A7F

EGujuratiSet = 0x40000

0A80-0AFF

EOriyaSet = 0x80000

0B00-0B7F

ETamilSet = 0x100000

0B80-0BFF

ETeluguSet = 0x200000

0C00-0C7F

EKannadaSet = 0x400000

0C80-0CFF

EMalayalamSet = 0x800000

0D00-0D7F

EThaiSet = 0x1000000

0E00-0E7F

ELaoSet = 0x2000000

0E80-0EFF

EGeorgianSet = 0x8000000

10A0-10FF

EHangulJamoSet = 0x10000000

1100-11FF

Note: This list is incomplete; see the TrueType documentation for other values.


Anonymous enum — Unicode ranges for iCoverage[1]

ESymbolSets = 0xFFFE

 

EKanaSets = 0x60000

 

EHangulSet = 0x100000

 

ECJKSet = 0x8000000

 

EPOC       SDK Home Glossary Indexes Previous Next Up