1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsdeviceinterface/gdi/inc/glyphsample.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,55 @@
1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// GlyphSample class.
1.18 +
1.19 +#ifndef GLYPHSAMPLE_H
1.20 +#define GLYPHSAMPLE_H
1.21 +
1.22 +/**
1.23 +Provides methods to map a TLanguage type to some pre-defined glyph samples.
1.24 +Samples are defined per writing script, e.g. specifying ELangFrench or
1.25 +ELangGerman will return the same set of samples.
1.26 +These samples are typically the tallest and 'deep'est characters w.r.t
1.27 +various scripts, useful for font rasterizers when calculating metrics.
1.28 +@internalTechnology
1.29 +*/
1.30 +NONSHARABLE_CLASS(GlyphSample)
1.31 + {
1.32 +public:
1.33 + /**
1.34 + Writing scripts defined according to Unicode.
1.35 + */
1.36 + enum TScript
1.37 + {
1.38 + EScriptDefault = 0x0, // No script, can't be bothered
1.39 + EScriptNone = 0x1, // No script, really
1.40 + EScriptOther = 0x2, // Unsupported scripts
1.41 + EScriptLatin = 0x3, // European
1.42 + EScriptGreek = 0x4, // European
1.43 + EScriptCyrillic = 0x5, // European
1.44 + EScriptHebrew = 0x6, // Middle Eastern
1.45 + EScriptArabic = 0x7, // Middle Eastern
1.46 + EScriptDevanagari = 0x8, // Indic
1.47 + EScriptThai = 0x9, // SE Asian
1.48 + EScriptHanIdeographs = 0xA, // E Asian
1.49 + };
1.50 +public:
1.51 + IMPORT_C static TInt TLanguage2TScript(TLanguage aLanguage);
1.52 + IMPORT_C static const TPtrC TScript2GlyphSample(TInt aScript);
1.53 +private:
1.54 + static const TInt KTLanguage2TScript[];
1.55 + static const TText* const KTScript2GlyphSample[];
1.56 + };
1.57 +
1.58 +#endif /* GLYPHSAMPLE_H */