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