1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // GlyphSample class. |
|
15 |
|
16 #ifndef GLYPHSAMPLE_H |
|
17 #define GLYPHSAMPLE_H |
|
18 |
|
19 /** |
|
20 Provides methods to map a TLanguage type to some pre-defined glyph samples. |
|
21 Samples are defined per writing script, e.g. specifying ELangFrench or |
|
22 ELangGerman will return the same set of samples. |
|
23 These samples are typically the tallest and 'deep'est characters w.r.t |
|
24 various scripts, useful for font rasterizers when calculating metrics. |
|
25 @internalTechnology |
|
26 */ |
|
27 NONSHARABLE_CLASS(GlyphSample) |
|
28 { |
|
29 public: |
|
30 /** |
|
31 Writing scripts defined according to Unicode. |
|
32 */ |
|
33 enum TScript |
|
34 { |
|
35 EScriptDefault = 0x0, // No script, can't be bothered |
|
36 EScriptNone = 0x1, // No script, really |
|
37 EScriptOther = 0x2, // Unsupported scripts |
|
38 EScriptLatin = 0x3, // European |
|
39 EScriptGreek = 0x4, // European |
|
40 EScriptCyrillic = 0x5, // European |
|
41 EScriptHebrew = 0x6, // Middle Eastern |
|
42 EScriptArabic = 0x7, // Middle Eastern |
|
43 EScriptDevanagari = 0x8, // Indic |
|
44 EScriptThai = 0x9, // SE Asian |
|
45 EScriptHanIdeographs = 0xA, // E Asian |
|
46 }; |
|
47 public: |
|
48 IMPORT_C static TInt TLanguage2TScript(TLanguage aLanguage); |
|
49 IMPORT_C static const TPtrC TScript2GlyphSample(TInt aScript); |
|
50 private: |
|
51 static const TInt KTLanguage2TScript[]; |
|
52 static const TText* const KTScript2GlyphSample[]; |
|
53 }; |
|
54 |
|
55 #endif /* GLYPHSAMPLE_H */ |
|