sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // GlyphSample class. sl@0: sl@0: #ifndef GLYPHSAMPLE_H sl@0: #define GLYPHSAMPLE_H sl@0: sl@0: /** sl@0: Provides methods to map a TLanguage type to some pre-defined glyph samples. sl@0: Samples are defined per writing script, e.g. specifying ELangFrench or sl@0: ELangGerman will return the same set of samples. sl@0: These samples are typically the tallest and 'deep'est characters w.r.t sl@0: various scripts, useful for font rasterizers when calculating metrics. sl@0: @internalTechnology sl@0: */ sl@0: NONSHARABLE_CLASS(GlyphSample) sl@0: { sl@0: public: sl@0: /** sl@0: Writing scripts defined according to Unicode. sl@0: */ sl@0: enum TScript sl@0: { sl@0: EScriptDefault = 0x0, // No script, can't be bothered sl@0: EScriptNone = 0x1, // No script, really sl@0: EScriptOther = 0x2, // Unsupported scripts sl@0: EScriptLatin = 0x3, // European sl@0: EScriptGreek = 0x4, // European sl@0: EScriptCyrillic = 0x5, // European sl@0: EScriptHebrew = 0x6, // Middle Eastern sl@0: EScriptArabic = 0x7, // Middle Eastern sl@0: EScriptDevanagari = 0x8, // Indic sl@0: EScriptThai = 0x9, // SE Asian sl@0: EScriptHanIdeographs = 0xA, // E Asian sl@0: }; sl@0: public: sl@0: IMPORT_C static TInt TLanguage2TScript(TLanguage aLanguage); sl@0: IMPORT_C static const TPtrC TScript2GlyphSample(TInt aScript); sl@0: private: sl@0: static const TInt KTLanguage2TScript[]; sl@0: static const TText* const KTScript2GlyphSample[]; sl@0: }; sl@0: sl@0: #endif /* GLYPHSAMPLE_H */