#include <openfont.h>
class TOpenFontFaceAttribBase |
Protected Attributes | |
---|---|
TUint | iCoverage |
TBufC< ENameLength > | iName |
TInt32 | iReserved |
TInt | iStyle |
Public Member Enumerations | |
---|---|
enum | anonymous { ELatinSet, EGreekSet, ECyrillicSet, EArmenianSet, ..., EHangulJamoSet } |
enum | anonymous { ESymbolSets, EKanaSets, EHangulSet, ECJKSet } |
enum | anonymous { EBold, EItalic, ESerif, EMonoWidth } |
enum | anonymous { ENameLength } |
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() |
void | SetBold(TBool) |
void | SetCoverage(TUint, TUint, TUint, TUint) |
void | SetItalic(TBool) |
void | SetMonoWidth(TBool) |
void | SetName(const TDesC &) |
void | SetSerif(TBool) |
TBool | operator==(const TOpenFontFaceAttribBase &) |
Font attribute base class.
This class is not intended for user derivation.
See also: TOpenFontFaceAttrib TOpenFontSpec
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.
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.
See also: SetCoverage()
Returns: A pointer to the flags that indicate the font's Unicode coverage. The flags are stored in an array of four 32-bit integers. When no information is available, all four integers are zero.
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.
Returns: ETrue if Chinese ideographs are supported.
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.
Returns: ETrue if Cyrillic characters are supported.
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.
Returns: ETrue if Greek characters are supported.
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.
See also: HasCJK()
Returns: ETrue if Korean characters are supported
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.
See also: HasCJK()
Returns: ETrue if Japanese characters are supported
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.
Returns: ETrue if Latin characters are supported
TBool | IsBold | ( | ) | const [inline] |
Tests if the typeface is inherently bold.
Returns: ETrue if the typeface is inherently bold.
TBool | IsItalic | ( | ) | const [inline] |
Tests if the typeface is inherently italic.
Returns: ETrue if the typeface is inherently italic.
TBool | IsMonoWidth | ( | ) | const [inline] |
Tests if all the characters have the same width.
Returns: ETrue if all the characters have the same width.
TBool | IsSerif | ( | ) | const [inline] |
Tests if the typeface has serifs.
Returns: ETrue if the typeface has serifs.
TBool | IsSymbol | ( | ) | const [inline] |
Tests if the typeface contains symbols only.
Returns: ETrue if the typeface contains symbols only.
void | SetBold | ( | TBool | aBold | ) | [inline] |
Sets the bold attribute.
Parameter | Description |
---|---|
aBold | The bold attribute takes this value: ETrue or EFalse. |
void | SetCoverage | ( | TUint | aCoverage0, |
TUint | aCoverage1 = 0, | |||
TUint | aCoverage2 = 0, | |||
TUint | aCoverage3 = 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.
Parameter | Description |
---|---|
aCoverage0 | The first set of coverage flags (bits 0-31). |
aCoverage1 | The second set of coverage flags (bits 32-63). |
aCoverage2 | The third set of coverage flags (bits 64-95). |
aCoverage3 | The fourth set of coverage flags (bits 96-127). |
void | SetItalic | ( | TBool | aItalic | ) | [inline] |
Sets the italic attribute.
Parameter | Description |
---|---|
aItalic | The italic attribute takes this value ETrue or EFalse. |
void | SetMonoWidth | ( | TBool | aMonoWidth | ) | [inline] |
Sets the mono-width attribute.
Parameter | Description |
---|---|
aMonoWidth | The mono-width attribute takes this value: ETrue or EFalse. |
void | SetName | ( | const TDesC & | aName | ) | [inline] |
Sets the name attribute.
Parameter | Description |
---|---|
aName | Descriptor containing typeface name. |
void | SetSerif | ( | TBool | aSerif | ) | [inline] |
Sets the serif attribute.
Parameter | Description |
---|---|
aSerif | The serif attribute takes this value ETrue or EFalse. |
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.
Parameter | Description |
---|---|
aAttrib | The font attributes to compare. This is an object of TOpenFontFaceAttribBase or of a derived class. |
Returns: ETrue if the values are equal.