|
1 /* |
|
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * THindExtensionApi.h |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent - Internal Symbian test code |
|
23 */ |
|
24 |
|
25 |
|
26 #ifndef __THINDIEXTENSIONAPIT_H__ |
|
27 #define __THINDIEXTENSIONAPIT_H__ |
|
28 |
|
29 #include <test/ttmsgraphicsstep.h> |
|
30 #include "TFreeTypeServer.h" |
|
31 |
|
32 /** |
|
33 Base class for Rasterizer tests. |
|
34 Contains the utility functions for creating the test font store |
|
35 */ |
|
36 class CRasterizerTest: public CTTMSGraphicsStep |
|
37 { |
|
38 public: |
|
39 CTFreeTypeServer* iServer; |
|
40 CBitmapFont* iFont; |
|
41 CFontStore* iFontStore; |
|
42 |
|
43 void LoadFontStore(); |
|
44 void CloseFontStore(); |
|
45 }; |
|
46 |
|
47 |
|
48 /** |
|
49 Test Rasterizer API: MOpenFontShapingExtension::RasterGlyphL() |
|
50 */ |
|
51 class CTestRasterizeGlyph: public CRasterizerTest |
|
52 { |
|
53 public: |
|
54 CTestRasterizeGlyph(); |
|
55 protected: |
|
56 TVerdict doTestStepL(); |
|
57 }; |
|
58 _LIT(KTestRasterizeGlyphStep,"RasterizeGlyph"); |
|
59 |
|
60 /** |
|
61 Test Rasterizer API: MOpenFontShapingExtension::GlyphIndex() |
|
62 */ |
|
63 class CTestGlyphIndex: public CRasterizerTest |
|
64 { |
|
65 public: |
|
66 CTestGlyphIndex(); |
|
67 protected: |
|
68 TVerdict doTestStepL(); |
|
69 }; |
|
70 _LIT(KTestGlyphIndexStep,"GlyphIndex"); |
|
71 |
|
72 /** |
|
73 Test Rasterizer API: MOpenFontShapingExtension::GlyphPointInHintedPixels() |
|
74 */ |
|
75 class CTestGlyphPointInHintedPixels: public CRasterizerTest |
|
76 { |
|
77 public: |
|
78 CTestGlyphPointInHintedPixels(); |
|
79 protected: |
|
80 TVerdict doTestStepL(); |
|
81 }; |
|
82 _LIT(KTestGlyphPointInHintedPixels,"GlyphPointInHintedPixels"); |
|
83 |
|
84 /** |
|
85 Test Rasterizer API: MOpenFontShapingExtension::GlyphPointInFontUnits() |
|
86 */ |
|
87 class CTestGlyphPointInFontUnits: public CRasterizerTest |
|
88 { |
|
89 public: |
|
90 CTestGlyphPointInFontUnits(); |
|
91 protected: |
|
92 TVerdict doTestStepL(); |
|
93 }; |
|
94 _LIT(KTestGlyphPointInFontUnits,"GlyphPointInFontUnits"); |
|
95 |
|
96 /** |
|
97 Test Rasterizer API: MOpenFontShapingExtension::GetExtensionFontMetrics() |
|
98 */ |
|
99 class CTestGetExtensionFontMetrics: public CRasterizerTest |
|
100 { |
|
101 public: |
|
102 CTestGetExtensionFontMetrics(); |
|
103 protected: |
|
104 TVerdict doTestStepL(); |
|
105 }; |
|
106 _LIT(KTestGetExtensionFontMetrics,"GetExtensionFontMetrics"); |
|
107 |
|
108 /** |
|
109 Test the Rasterizer API: MOpenFontTrueTypeExtension |
|
110 */ |
|
111 class CTestTrueTypeTable: public CRasterizerTest |
|
112 { |
|
113 public: |
|
114 CTestTrueTypeTable(); |
|
115 protected: |
|
116 enum TExpectedResult |
|
117 { |
|
118 // Does not exist in font |
|
119 EUnavailable, |
|
120 // Exists, has not been requested before |
|
121 EAvailableNew, |
|
122 // Exists, old one is being served up again |
|
123 EAvailableExisting |
|
124 }; |
|
125 TAny* TestGetTable(TExpectedResult aExpected, |
|
126 MOpenFontTrueTypeExtension* aTableStore, TUint32 aTag, TInt* aLength); |
|
127 TVerdict doTestStepL(); |
|
128 }; |
|
129 _LIT(KTestTrueTypeTableStep,"TypeTypeTable"); |
|
130 |
|
131 |
|
132 #endif |