os/textandloc/fontservices/textshaperplugin/test/HindiDemo/source/hindiDemoApp.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-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 * hindiDemo.cpp
    16 * hindiDemo application
    17 *
    18 */
    19 
    20 
    21 #include <e32keys.h>
    22 #include <coemain.h>
    23 #include <eikenv.h>
    24 #include <eikdef.h>
    25 #include <eikstart.h>
    26 #include <techview/eikfontd.h>
    27 
    28 #include <hindidemo.rsg>
    29 #include "hindiDemo.hrh"
    30 #include "hindiDemoApp.h"
    31 #include <techview/eiklabel.h>
    32 #include <techview/eikcmbut.h>
    33 #include <techview/eikrted.h>
    34 #include <barsread.h> 
    35 #include <badesca.h> 
    36 
    37 
    38 // hindi sample text 
    39 // sample 1
    40 _LIT16(KHindi1,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020\x0909\x0926\x094D\x0926\x0947\x0936\x094D\x0020\x0915\x094D\x0937\x093F\x092A\x094D\x0930");
    41 _LIT16(KHindi2,"\x092d\x0942\x0930\x094d\x092d\x0941\x0935\x0903\x0020\x0938\x094d\x0935\x0903\x0020\x0924\x0924\x094d\x0938\x0935\x093f\x0924\x0941\x0930\x094d\x0935\x0930\x0947\x0923\x094d\x092f\x0902");
    42 _LIT16(KHindi3,"\x092d\x0930\x094d\x0917\x094b\x0020\x0926\x0947\x0935\x0938\x094d\x092f\x0020\x0927\x0940\x092e\x0939\x093f\x0020\x0927\x093f\x092f\x094b\x0020\x092f\x094b\x0928\x0903\x0020\x092a\x094d\x0930\x091a\x094b\x0926\x092f\x093e\x0924\x094d\x0020");
    43 
    44 // sample 2
    45 _LIT16(KHindi4,"\x092f\x0924\x094d\x0930\x0020\x092f\x094b\x0917\x0947\x0936\x094d\x0935\x0930\x0020\x0915\x0943\x0937\x094d\x0923\x094b\x0020\x092f\x0924\x094d\x0930\x0020\x092a\x093e\x0930\x094d\x0925\x094b\x0020\x0927\x0930\x094d\x0928\x0941\x0927\x0930\x0903");
    46 _LIT16(KHindi5,"\x0924\x0924\x094d\x0930\x0020\x0936\x094d\x0930\x0940\x0930\x094d\x0935\x093f\x091c\x092f\x094b\x0020\x092d\x0942\x0924\x093f\x0930\x094d\x0927\x0941\x0935\x093e\x0020\x0928\x0940\x0924\x093f\x0930\x094d\x092e\x0924\x093f\x0930\x094d\x092e\x092e");
    47 _LIT16(KHindi6,"\x0915\x0941\x0924\x0938\x094d\x0924\x094d\x0935\x093e\x0020\x0915\x0936\x094d\x092e\x0932\x092e\x093f\x0926\x0902\x0020\x0935\x093f\x0936\x092e\x0947\x0020\x0938\x092e\x0941\x092a\x0938\x094d\x0925\x093f\x0924\x092e\x094d");
    48 
    49 // sample 3
    50 _LIT16(KHindi7,"\x0905\x0928\x093e\x0930\x094d\x092f\x091c\x0941\x0937\x094d\x091f\x092e\x0938\x094d\x0935\x0930\x094d\x0917\x094d\x092f\x092e\x0915\x0940\x0930\x094d\x0924\x093f\x0915\x0930\x092e\x0930\x094d\x091c\x0941\x0928");
    51 _LIT16(KHindi8,"\x0915\x094d\x0932\x0948\x092c\x094d\x092f\x0902\x0020\x092e\x0020\x0938\x094d\x092e\x0020\x0917\x092e\x0903\x0020\x092a\x093e\x0930\x094d\x0925\x0928\x0948\x0924\x0924\x094d\x0924\x094d\x0935\x092f\x094d\x092f\x0941\x092a\x092a\x0926\x094d\x092f\x0924\x0947");
    52 _LIT16(KHindi9,"\x0915\x094d\x0937\x0941\x0926\x094d\x0930\x0902\x0020\x0939\x0943\x0926\x092f\x0926\x094c\x0930\x094d\x092c\x0932\x094d\x092f\x0902\x0020\x0924\x094d\x092f\x0915\x094d\x0924\x094d\x0935\x094b\x0924\x094d\x0924\x093f\x0937\x094d\x091f\x0020\x092a\x0930\x0902\x0924\x092a");
    53 
    54 // test 4 -  two character test data
    55 _LIT16(KTest1,"\x091c\x092e\x094d\x0918\x0940\x0902\x091a\x094d\x092f\x0940");
    56 _LIT16(KTest2,"\x092e\x092e\x0020");
    57 _LIT16(KTest3,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020");
    58 
    59 //Kannada sample text
    60 // sample 1
    61 _LIT16(KKannada1,"\x0CA8\x0CAE\x0CCD\x0CAE\x0020\x0CB0\x0CBE\x0CB7\x0CCD\x0C9F\x0CCD\x0CB0\x0020\x0CAD\x0CBE\x0CB0\x0CA4");
    62 _LIT16(KKannada2,"\x0CB2\x0C95\x0CCD\x0CB7\x0CCD\x0CAE\x0CCD\x0CAF\x0CBE");
    63 _LIT16(KKannada3,"\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCB\x0C82");
    64 // sample 2
    65 _LIT16(KKannada4,"\x0CB6\x0CCD\x0CB0\x0CC0\x0020\x0CAD\x0C97\x0CB5\x0CBE\x0CA8\x0CC1\x0CB5\x0CBE\x0C9A\x0C95\x0CC1\x0CA4\x0CB8\x0CCD\x0CA4\x0CCD\x0CB5\x0CBE\x0020\x0C95\x0CB6\x0CCD\x0CAE\x0CB2\x0CAE\x0CBF\x0CA6\x0C82\x0020\x0CB5\x0CBF\x0CB7\x0CAE\x0020\x0CB8\x0CAE\x0CC1\x0CAA\x0CB8\x0CCD\x0CA5\x0CBF\x0CA4\x0CAE\x0CCD");
    66 _LIT16(KKannada5,"\x0C85\x0CA8\x0CBE\x0CB0\x0CCD\x0CAF\x0C9C\x0CC1\x0CB7\x0CCD\x0CA0\x0CAE\x0CB8\x0CCD\x0CB5\x0CB0\x0CCD\x0C97\x0CCD\x0CAF\x0CAE\x0C95\x0CC0\x0CB0\x0CCD\x0CA4\x0CBF\x0C95\x0CB0\x0CAE\x0CB0\x0CCD\x0C9C\x0CC1\x0CA8");
    67 _LIT16(KKannada6,"\x0C95\x0CCD\x0CB2\x0CC8\x0CAC\x0CCD\x0CAF\x0C82\x0020\x0CAE\x0CBE\x0020\x0CB8\x0CCD\x0CAE\x0020\x0C97\x0CAE\x0C83\x0020\x0CAA\x0CBE\x0CB0\x0CCD\x0CA5\x0020\x0CA8\x0CC8\x0CA4\x0CA4\x0CCD\x0CA4\x0CCD\x0CB5\x0CAF\x0CCD\x0CAF\x0CC1\x0CAA\x0CAA\x0CA7\x0CCD\x0CAF\x0CA4\x0CC7");
    68 // sample 3
    69 _LIT16(KKannada7,"\x0CB8\x0CC1\x0CAA\x0CCD\x0CB0\x0CB8\x0CBE\x0CA6\x0C83\x0020\x0CAA\x0CCD\x0CB0\x0CB8\x0CA8\x0CCD\x0CA8\x0CBE\x0CA4\x0CCD\x0CAE\x0CBE");
    70 _LIT16(KKannada8,"\x0CB5\x0CBF\x0CB6\x0CCD\x0CB5\x0CA7\x0CC3\x0C97\x0CCD\x0CB5\x0CBF\x0CB6\x0CCD\x0CB5\x0CAD\x0CC1\x0C97\x0CCD\x0CB5\x0CBF\x0CAD\x0CC1\x0C83\x0CB8\x0CA4\x0CCD\x0C95\x0CB0\x0CBE\x0CA4\x0CBE\x0020\x0CB8\x0CA4\x0CCD\x0C95\x0CC3\x0C83\x0020\x0CB8\x0CBE\x0CA7\x0CC1");
    71 _LIT16(KKannada9,"\x0CB0\x0CCD\x0C9C\x0CB9\x0CCD\x0CA8\x0CC1\x0CB0\x0CCD\x0CA8\x0CBE\x0CB0\x0CBE\x0CAF\x0CA3\x0CCB\x0020\x0CA8\x0CB0\x0C83\x0C95\x0CCD\x0CB7\x0CC1\x0CA6\x0CCD\x0CB0\x0C82\x0020\x0CB9\x0CC3\x0CA6\x0CAF\x0CA6\x0CCC\x0CB0\x0CCD\x0CAC\x0CB2\x0CCD\x0CAF\x0C82\x0020\x0CA4\x0CCD\x0CAF\x0C95\x0CCD\x0CA4\x0CCD\x0CB5\x0CCB\x0CA4\x0CCD\x0CA4\x0CBF\x0CB7\x0CCD\x0CA0\x0020\x0CAA\x0CB0\x0CA8\x0CCD\x0CA4\x0CAA");
    72 
    73 // Sample 4
    74 _LIT16(KTestKannada1,"\x0C85\x0CB8\x0C82\x0C96\x0CCD\x0CAF\x0CC7\x0CAF\x0CCB\x0C85\x0CAA\x0CCD\x0CB0\x0CAE\x0CC7\x0CAF\x0CBE\x0CA4\x0CCD\x0CAE\x0CBE\x0020\x0CB5\x0CBF\x0CB6\x0CBF\x0CB7\x0CCD\x0C9F\x0C83");
    75 _LIT16(KTestKannada2,"\x0CB6\x0CBF\x0CB7\x0CCD\x0C9F\x0C95\x0CC3\x0C9A\x0CCD\x0C9B\x0CC1\x0C9A\x0CBF\x0C83\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBE\x0CB0\x0CCD\x0CA5\x0C83\x0020\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CB8\x0C82\x0C95\x0CB2\x0CCD\x0CAA\x0C83\x0020\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBF\x0CA6\x0C83");
    76 _LIT16(KTestKannada3,"\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBF\x0CB8\x0CBE\x0CA7\x0CA8\x0C83");
    77 
    78 //Gujarati sample text
    79 // sample 1
    80 _LIT16(KGujarati1,"\x0AAA\x0ACD\x0AB0\x0AA4\x0ABF\x0AB7\x0ACD\x0AA0\x0ABE\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0AA7\x0ABF\x0A95\x0ABE\x0AB0\x0ACB\x0AA8\x0AC0\x0020\x0AA6\x0AC3\x0AB7\x0ACD\x0A9F\x0ABF\x0A8F\x0020\x0AB8\x0AB0\x0ACD\x0AB5\x0020\x0AAE\x0ABE\x0AA8\x0AB5\x0ACB\x0020\x0A9C\x0AA8\x0ACD\x0AAE\x0AA5\x0AC0\x0020\x0AB8\x0ACD\x0AB5\x0AA4\x0A82\x0AA4\x0ACD\x0AB0\x0020\x0A85\x0AA8\x0AC7\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0020\x0AB9\x0ACB\x0AAF\x0020\x0A9B\x0AC7");
    81 _LIT16(KGujarati2,"\x0AA4\x0AC7\x0AAE\x0AA8\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0AB5\x0ABF\x0A9A\x0ABE\x0AB0\x0AB6\x0A95\x0ACD\x0AA4\x0ABF\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0A82\x0AA4\x0A83\x0A95\x0AB0\x0AA3\x0020\x0AB9\x0ACB\x0AAF\x0020\x0A9B\x0AC7\x0020\x0A85\x0AA8\x0AC7\x0020\x0AA4\x0AC7\x0AAE\x0AA3\x0AC7\x0020\x0AAA\x0AB0\x0AB8\x0ACD\x0AAA\x0AB0\x0020\x0AAC\x0A82\x0AA7\x0AC1\x0AA4\x0ACD\x0AB5\x0AA8\x0AC0\x0020\x0AAD\x0ABE\x0AB5\x0AA8\x0ABE\x0AAF\x0AC0\x0020\x0AB5\x0AB0\x0ACD\x0AA4\x0AB5\x0AC1\x0A82");
    82 _LIT16(KGujarati3,"\x0A9C\x0ACB\x0A88\x0A8F");
    83 // sample 2
    84 _LIT16(KGujarati4,"\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0AA8\x0AC0\x0AA4\x0AC0\x0AA8\x0ABE\x0020\x0A85\x0AA8\x0AC1\x0AB8\x0A82\x0AA7\x0ABE\x0AA8\x0AAE\x0ABE\x0A82\x0020\x0AA4\x0AC8\x0AAF\x0ABE\x0AB0\x0020\x0AA5\x0AAF\x0AC7\x0AB2\x0ABE\x0020\x0AA8\x0AB5\x0ABE\x0020\x0A85\x0AAD\x0ACD\x0AAF\x0ABE\x0AB8\x0A95\x0ACD\x0AB0\x0AAE\x0AAE\x0ABE\x0A82");
    85 _LIT16(KGujarati5,"\x0AA6\x0AB0\x0AC7\x0A95\x0020\x0AB5\x0ABF\x0AB7\x0AAF\x0AA8\x0ABE\x0020\x0AAA\x0ABE\x0AA0\x0ACD\x0AAF\x0A95\x0ACD\x0AB0\x0AAE\x0AA8\x0AC7\x0020\x0AB5\x0AA7\x0AC1\x0020\x0AB8\x0AA7\x0AA8\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0AA7\x0ACD\x0AAF\x0AA4\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AA8\x0ACB\x0020\x0AAA\x0ACD\x0AB0\x0AAF\x0AA4\x0ACD\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AAE\x0ABE\x0A82");
    86 _LIT16(KGujarati6,"\x0A86\x0AB5\x0ACD\x0AAF\x0ACB\x0020\x0A9B\x0AC7\x002E\x0020\x0020\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0AA8\x0AC0\x0AA4\x0ABF\x0AA8\x0ABE\x0020\x0AAE\x0AC1\x0AB8\x0AA6\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0020\x0A85\x0AAD\x0ACD\x0AAF\x0ABE\x0AB8\x0A95\x0ACD\x0AB0\x0AAE\x0ACB\x0AA8\x0AC0\x0020\x0A85\x0AAE\x0AB2");
    87 // sample 3
    88 _LIT16(KGujarati7,"\x0A95\x0AB0\x0AB5\x0ABE\x0020\x0AB8\x0ABE\x0AA5\x0AC7\x0020\x0A95\x0AC7\x0A9F\x0AB2\x0ABE\x0A82\x0A95\x0020\x0AB9\x0ABE\x0AB0\x0ACD\x0AA6\x0AB6\x0ACD\x0AAA\x0020\x0AA4\x0AA4\x0ACD\x0AA4\x0ACD\x0AB5\x0ACB\x0020\x0AA6\x0ABE\x0A96\x0AB2\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AA8\x0AC1\x0A82\x0020\x0AA8\x0A95\x0ACD\x0A95\x0AC0\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0A85\x0AB5\x0ACD\x0AAF\x0AC1\x0A82\x0020\x0A9B\x0AC7\x002E");
    89 _LIT16(KGujarati8,"\x0A86\x0020\x0AB9\x0ABE\x0AB0\x0ACD\x0AA6\x0AB6\x0ACD\x0AAA\x0020\x0AA4\x0AA4\x0ACD\x0AA4\x0ACD\x0AB5\x0ACB\x0A82\x0AAE\x0ABE\x0A82\x0020\x0AAD\x0ABE\x0AB0\x0AA4\x0AA8\x0AC0\x0020\x0AB8\x0ACD\x0AB5\x0AA4\x0A82\x0AA4\x0ACD\x0AB0\x0ACD\x0AAF\x0020\x0A9A\x0AB3\x0AB5\x0AB3\x002C\x0020\x0A86\x0AB5\x0AA3\x0AC0\x0020\x0AAC\x0A82\x0AA7\x0ABE\x0AB0\x0AA3\x0AC0\x0AAF\x0020\x0A9C\x0AB5\x0ABE\x0AAC\x0AA6\x0ABE\x0AB0\x0AC0\x0A93\x002C");
    90 _LIT16(KGujarati9,"\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0A90\x0A95\x0ACD\x0AAF\x002C\x0020\x0A86\x0AB5\x0AA3\x0ACB\x0020\x0AB8\x0ABE\x0A82\x0AB8\x0ACD\x0A95\x0AC3\x0AA4\x0ABF\x0A95\x0020\x0AB5\x0ABE\x0AB0\x0AB8\x0ACB\x002C\x0020\x0AB8\x0AB0\x0ACD\x0AB5\x0A9C\x0AA8\x0AB8\x0AAE\x0ABE\x0AA8\x0AA4\x0ABE\x002C\x0020\x0AB2\x0ACB\x0A95\x0AB6\x0ABE\x0AB9\x0AC0\x0020\x0A85\x0AA8\x0AC7");
    91 
    92 // Sample 4
    93 _LIT16(KTestGujarati1,"\x0AAC\x0ABF\x0AA8\x0AB8\x0ABE\x0A82\x0AAA\x0ACD\x0AB0\x0AA6\x0ABE\x0AAF\x0ABF\x0A95\x0AA4\x0ABE\x002C\x0020\x0A9C\x0ABE\x0AA4\x0ABE\x0AAF\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0AA4\x0ABE\x002C\x0020\x0AAA\x0AB0\x0ACD\x0AAF\x0ABE\x0AB5\x0AB0\x0AA3\x0020\x0AB8\x0AC1\x0AB0\x0A95\x0ACD\x0AB7\x0ABE\x002C\x0020\x0AB8\x0ABE\x0AAE\x0ABE\x0A9C\x0ABF\x0A95\x0020\x0A85\x0AB5\x0AB0\x0ACB\x0AA7\x0ACB\x0AA8\x0AC1\x0A82");
    94 _LIT16(KTestGujarati2,"\x0AA8\x0ABF\x0AB5\x0ABE\x0AB0\x0AA3\x0020\x0AA4\x0AA5\x0ABE\x0020\x0AB5\x0AC8\x0A9C\x0ACD\x0A9E\x0ABE\x0AA8\x0ABF\x0A95\x0020\x0A95\x0AC7\x0AB3\x0AB5\x0AA3\x0AC0\x0020\x0A9C\x0AC7\x0AB5\x0AC0\x0020\x0AAC\x0ABE\x0AAC\x0AA4\x0ACB\x0AA8\x0AC0\x0020\x0AB8\x0AAE\x0ABE\x0AB5\x0AC7\x0AB6\x0020\x0AA5\x0ABE\x0AAF\x0020\x0A9B\x0AC7\x002E\x0020\x0AB5\x0AB3\x0AC0");
    95 _LIT16(KTestGujarati3,"\x0AAE\x0ABE\x0AA7\x0ACD\x0AAF\x0AAE\x0ABF\x0A95\x0020\x0A95\x0AC7\x0020\x0A89\x0AAF\x0ACD\x0AAF\x0AA4\x0AB0\x0020\x0AAE\x0ABE\x0AA7\x0ACD\x0AAF\x0AAE\x0ABF\x0A95\x0020\x0A95\x0A95\x0ACD\x0AB7\x0ABE\x0A8F\x0020\x0A86\x0020\x0AAC\x0AA7\x0AC0\x0020\x0A9C\x0020\x0AAC\x0ABE\x0AAC\x0AA4\x0ACB\x0AA8\x0AC1\x0A82\x0020\x0AB5\x0AA7\x0AC1\x0020\x0AB8\x0AA7\x0AA8\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0A86\x0AAA\x0AB5\x0ABE\x0AA8\x0ACB\x0020\x0A89\x0AA6\x0ACD\x0AA6\x0AC7\x0AB6\x0020\x0AAA\x0AA3\x0020\x0AB8\x0ACD\x0AB5\x0AC0\x0A95\x0ABE\x0AB0\x0ABE\x0AAF\x0ACB\x0020\x0A9B\x0AC7");
    96 
    97 
    98 //Bengali sample text
    99 // sample 1
   100 _LIT16(KBengali1," \x098F\x0995\x0020\x09AC\x09CB\x0995\x09BE\x0020\x099C\x09CB\x09B2\x09BE\x0020\x099B\x09BF\x09B2\x0964\x0020\x09B8\x09C7\x0020\x0020\x098F\x0995\x09A6\x09BF\x09A8\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x09A7\x09BE\x09A8\x0020\x0995\x09BE\x099F\x09A4\x09C7\x0020\x0997");
   101 _LIT16(KBengali2,"\x09BF\x09DF\x09C7\x0020\x0996\x09C7\x09A4\x09C7\x09B0\x0020\x09AE\x09BE\x099D\x0996\x09BE\x09A8\x09C7\x0987\x0020\x0998\x09C1\x09AE\x09BF\x09DF\x09C7\x0020\x09AA\x09DC\x09B2\x0964\x0020\x0998\x09C1\x09AE\x0020\x09A5\x09C7\x0995\x09C7\x0020\x0989\x09A0\x09C7\x0020\x0986\x09AC\x09BE\x09B0\x0020\x0995\x09BE\x09B8");
   102 _LIT16(KBengali3,"\x09CD\x09A4\x09C7\x0020\x09B9\x09BE\x09A4\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x09A6\x09C7\x0996\x09B2\x002C\x0020\x09B8\x09C7\x099F\x09BE\x0020\x09AC\x09A1\x09CD\x09A1\x0020\x0997\x09B0\x09AE\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0996\x09BE\x09A8");
   103 // sample 2
   104 _LIT16(KBengali4,"\x09BE\x0020\x09B0\x09CB\x09A6\x0020\x09B2\x09C7\x0997\x09C7\x0020\x0997\x09B0\x09AE\x0020\x09B9\x09DF\x09C7\x099B\x09BF\x09B2\x002C\x0020\x0995\x09BF\x09A8\x09CD\x09A4\x09C1\x0020\x099C\x09CB\x09B2\x09BE\x0020\x09AD\x09BE\x09AC\x09B2\x09C7\x0020\x09A4\x09BE\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9");
   105 _LIT16(KBengali5,"\x09DF\x09C7\x099B\x09C7\x0964\x0020\x09A4\x0996\x09A8\x0020\x09B8\x09C7\x0020\x0060\x0986\x09AE\x09BE\x09B0\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A4\x09CB\x0020\x09AE\x09B0\x09C7\x0020\x09AF\x09BE\x09AC\x09C7\x0020\x09B0\x09C7\x0021\x0027\x0020\x09AC\x09B2\x09C7\x0020\x09B9\x09BE\x0989\x0020\x09B9");
   106 _LIT16(KBengali6,"\x09BE\x0989\x0020\x0995\x09B0\x09C7\x0020\x0995\x09BE\x0981\x09A6\x09A4\x09C7\x0020\x09B2\x09BE\x0997\x09B2\x0964\x0020\x09AA\x09BE\x09B6\x09C7\x09B0\x0020\x0996\x09C7\x09A4\x09C7\x0020\x098F\x0995\x0020\x099A\x09BE\x09B7\x09BE\x0020\x0995\x09BE\x099C\x0020\x0995\x09B0\x099B\x09BF\x09B2\x0964\x0020");
   107 // sample 3
   108 _LIT16(KBengali7,"\x099C\x09CB\x09B2\x09BE\x09B0\x0020\x0995\x09BE\x09A8\x09CD\x09A8\x09BE\x0020\x09B6\x09C1\x09A8\x09C7\x0020\x09B8\x09C7\x0020\x09AC\x09B2\x09CD\x09B2\x002C\x0020\x0060\x0995\x09BF\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x003F\x0027\x0020\x099C\x09CB\x09B2\x09BE\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020");
   109 _LIT16(KBengali8,"\x0060\x0986\x09AE\x09BE\x09B0\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0027\x0020\x09A4\x09BE\x0020\x09B6\x09C1\x09A8\x09C7\x0020\x099A\x09BE\x09B7\x09BE\x0020\x09B9\x09BE\x09B8\x09A4\x09C7\x0020\x09B9\x09BE\x09B8\x09A4\x09C7\x0020");
   110 _LIT16(KBengali9,"\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x0993\x0995\x09C7\x0020\x099C\x09B2\x09C7\x0020\x09A1\x09C1\x09AC\x09BF\x09DF\x09C7\x0020\x09B0\x09BE\x0996\x002C\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B8\x09C7\x09B0\x09C7\x0020\x09AF\x09BE\x09AC\x09C7\x0964\x0027\x0020\x099C\x09B2\x09C7\x0020");
   111 
   112 // Sample 4
   113 _LIT16(KTestBengali1,"\x09A1\x09C1\x09AC\x09BF\x09DF\x09C7\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A0\x09BE\x09A3\x09CD\x09A1\x09BE\x0020\x09B9\x09B2\x002C\x0020\x099C\x09CB\x09B2\x09BE\x0993\x0020\x0996\x09C1\x09AC\x0020\x09B8\x09C1\x0996\x09C0\x0020\x09B9\x09B2\x0964\x0020\x09A4\x09BE\x09B0\x09AA\x09B0\x0020");
   114 _LIT16(KTestBengali2,"\x098F\x0995\x09A6\x09BF\x09A8\x0020\x099C\x09CB\x09B2\x09BE\x09B0\x0020\x09AE\x09BE\x09DF\x09C7\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0020\x09B8\x0995\x09B2\x09C7\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x09AC\x09A6\x09CD\x09A6\x09BF\x0020\x09A1\x09BE\x0995\x0964\x0027\x0020");
   115 _LIT16(KTestBengali3,"\x099C\x09CB\x09B2\x09BE\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x0986\x09AE\x09BF\x0020\x0993\x09B7\x09C1\x09A7\x0020\x099C\x09BE\x09A8\x09BF\x0964\x0027\x0020\x09AC\x09B2\x09C7\x002C\x0020\x09B8\x09C7\x0020\x09A4\x09BE\x09B0\x0020\x09AE\x09BE\x0995\x09C7\x0020\x09AA\x09C1\x0995\x09C1\x09B0\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x0997\x09BF\x09DF\x09C7\x0020\x099C\x09B2\x09C7\x09B0\x0020\x09AD\x09BF\x09A4\x09B0\x09C7\x0020");
   116 
   117 
   118 
   119 //Tamil sample text
   120 // sample 1
   121 _LIT16(KTamil1,"\x0BAA\x0BBE\x0BAF\x0BBF\x0BB0\x0BAE\x0BCD");
   122 _LIT16(KTamil2,"\x0B95\x0B9F\x0BB5\x0BC1\x0BB3\x0BCD\x0BB5\x0BBE\x0BB4\x0BCD\x0BA4\x0BCD\x0BA4\x0BC1");
   123 _LIT16(KTamil3,"\x0BAA\x0BC2\x0BB5\x0BBF\x0BA9\x0BCD\x0BAE\x0BC7\x0BB2\x0BCD\x0BB5\x0BA8\x0BCD\x0BA4\x0BB0\x0BC1\x0BB3\x0BC1\x0BAE\x0BCD\x0BAA\x0BC1\x0B99\x0BCD\x0B95\x0BB5\x0BA9\x0BCD\x0BA4\x0BA9\x0BCD\x0BAA\x0BCA\x0BB1\x0BCD\x0BAA\x0BBE\x0BA4\x0BAE\x0BCD");
   124 // sample 2
   125 _LIT16(KTamil4,"\x0BA8\x0BBE\x0BB5\x0BBF\x0BA9\x0BBE\x0BB2\x0BCD\x0BA8\x0BBE\x0BB3\x0BC1\x0BAE\x0BCD\x0BA8\x0BB5\x0BBF\x0BA9\x0BCD\x0BB1\x0BC7\x0BA4\x0BCD\x0BA4\x0BBF\x0BAE\x0BC7\x0BB5\x0BC1\x0BAE\x0BC1\x0B9F\x0BBF");
   126 _LIT16(KTamil5,"\x0BAA\x0BC6\x0BB2\x0BCD\x0BB2\x0BBE\x0BAE\x0BCD\x0B89\x0BA3\x0BB0\x0B8E\x0BB4\x0BC1\x0BA4\x0BCD\x0BA4\x0BBF\x0BA9\x0BCD\x0B87\x0BB2\x0B95\x0BCD\x0B95\x0BA3\x0BA4\x0BCD\x0BA4\x0BC8\x0B9A\x0BCD");
   127 _LIT16(KTamil6,"\x0B9A\x0BCA\x0BB2\x0BCD\x0BB2\x0BBE\x0BB2\x0BCD\x0B89\x0BB0\x0BC8\x0BAA\x0BCD\x0BAA\x0BA9\x0BCD\x0BA4\x0BCA\x0B95\x0BC1\x0BA4\x0BCD\x0BA4\x0BC1.");
   128 // sample 3
   129 _LIT16(KTamil7,"\x0B85\x0BB5\x0BC8\x0BAF\x0B9F\x0B95\x0BCD\x0B95\x0BAE\x0BCD");
   130 _LIT16(KTamil8,"\x0B89\x0BA3\x0BCD\x0BA3\x0BAE\x0BC1\x0B9F\x0BBF\x0BAF\x0BBE\x0BA4\x0BB5\x0BCB\x0BA4\x0BA8\x0BC0\x0BB0\x0BCD\x0BB5\x0BBE\x0BA9\x0BCD\x0BB5\x0BBE\x0BAF\x0BCD\x0BAA\x0BCD\x0BAA\x0B9F\x0BCD");
   131 _LIT16(KTamil9,"\x0B9F\x0BC6\x0BA3\x0BCD\x0BA3\x0B85\x0BAE\x0BC1\x0BA4\x0BBE\x0BA9\x0BA4\x0BBF\x0BB2\x0BCD\x0BB2\x0BC8\x0BAF\x0BCB-\x0BAE\x0BA3\x0BCD\x0BA3\x0BBF\x0BA9\x0BCD\x0BAE\x0BC7\x0BB2\x0BCD");
   132 // Sample 4
   133 _LIT16(KTestTamil1,"\x0BA8\x0BB2\x0BCD\x0BB2\x0BBE\x0BB0\x0BC8\x0B9A\x0BCD\x0B9A\x0BC7\x0BB0\x0BCD\x0BA8\x0BCD\x0BA4\x0BB2\x0BBE\x0BB2\x0BCD\x0BA8\x0BBE\x0BA9\x0BCD\x0B9A\x0BCA\x0BA9\x0BCD\x0BA9\x0BAA\x0BC1\x0BA9\x0BCD\x0B9A\x0BCA\x0BB2\x0BCD\x0BB2\x0BC1\x0BAE\x0BCD");
   134 _LIT16(KTestTamil2,"\x0B8E\x0BB2\x0BCD\x0BB2\x0BCB\x0BB0\x0BC1\x0BAE\x0BCD\x0B95\x0BC8\x0B95\x0BCA\x0BB3\x0BCD\x0BB5\x0BB0\x0BCD\x0B88\x0B99\x0BCD\x0B95\x0BC1.");
   135 _LIT16(KTestTamil3,"\x0B89\x0BA3\x0BCD\x0BA3\x0BAE\x0BC1\x0B9F\x0BBF\x0BAF\x0BBE\x0BA4\x0BB5\x0BCB\x0BA4\x0BA8\x0BC0\x0BB0\x0BCD\x0BB5\x0BBE\x0BA9\x0BCD\x0BB5\x0BBE\x0BAF\x0BCD\x0BAA\x0BCD\x0BAA\x0B9F\x0BCD");
   136 
   137 
   138 //Telugu sample text
   139 // sample 1
   140 _LIT16(KTelugu1,"\x0C38\x0C30\x0C4D\x0C35\x0C24\x0C4D\x0C30\x0C17\x0C2E\x0C1A\x0C3F\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C1E\x0C4D");
   141 _LIT16(KTelugu2,"\x0C15\x0C42\x0C1F\x0C38\x0C4D\x0C25\x0C2E\x0C1A\x0C32\x0C28\x0C4D\x0C27\x0C4D\x0C30\x0C41\x0C35\x0C2E");
   142 _LIT16(KTelugu3,"\x0C05\x0C25\x0C48\x0C24\x0C26\x0C2A\x0C4D\x0C2F\x0C36\x0C15\x0C4D\x0C24\x0C4B\x093D\x0C38");
   143 // sample 2
   144 _LIT16(KTelugu4,"\x0C2F\x0C4B\x0C28\x0C3F\x0C30\x0C4D\x0C2E\x0C39\x0C26\x0C4D\x0C2C\x0C4D\x0C30\x0C39\x0C4D\x0C2E");
   145 _LIT16(KTelugu5,"\x0C26\x0C47\x0C39\x0C47\x093D\x0C38\x0C4D\x0C2E\x0C3F\x0C28\x0C4D\x0C2A\x0C4D\x0C30\x0C15\x0C3E\x0C36");
   146 _LIT16(KTelugu6,"\x0C2A\x0C4D\x0C30\x0C35\x0C43\x0C24\x0C4D\x0C24\x0C3F\x0C30\x0C3E\x0C30\x0C2E\x0C4D\x0C2D\x0C03");
   147 // sample 3
   148 _LIT16(KTelugu7,"\x0C1C\x0C41\x0C39\x0C4D\x0C35\x0C26\x0C43\x0C37\x0C3F\x0C30\x0C4D\x0C39\x0C4B\x0C24\x0C3E");
   149 _LIT16(KTelugu8,"\x0C2A\x0C24\x0C24\x0C4D\x0C30\x0C48\x0C30\x0C4D\x0C26\x0C4D\x0C2F\x0C3E\x0C35\x0C3E\x0C2D\x0C42\x0C2E");
   150 _LIT16(KTelugu9,"\x0C26\x0C4D\x0C2F\x0C3E\x0C14\x0C30\x0C4D\x0C23\x0C4B\x0C28\x0C4D\x0C2E\x0C39\x0C3F\x0C28\x0C3E");
   151 // Sample 4
   152 _LIT16(KTestTelugu1,"\x0C09\x0C26\x0C4D\x0C35\x0C43\x0C24\x0C4D\x0C30\x0C39\x0C28\x0C4D\x0C35\x0C3E\x0C1C\x0C3F\x0C28\x0C3E\x0C02");
   153 _LIT16(KTestTelugu2,"\x0C05\x0C30\x0C4D\x0C37\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C42\x0C30\x0C4D\x0C2E\x0C2F\x0C4B \x0C18\x0C43\x0C24\x0C38\x0C4D");
   154 _LIT16(KTestTelugu3,"\x0C07\x0C24\x0C4D\x0C2A\x0C41\x0C30\x0C4D\x0C35\x0C28\x0C41\x0C24\x0C4D\x0C24\x0C36\x0C4D\x0C1A\x0C30\x0C4D\x0C37\x0C23\x0C40\x0C27\x0C43\x0C24\x0C3F\x0C03");
   155 
   156 void Panic(TInt aPanic)
   157 	{
   158 	_LIT(KPanic, "hindiDemo Application");
   159 	User::Panic(KPanic,aPanic);
   160 	}
   161 
   162 // Class CHindiContainer
   163 
   164 void CHindiContainer::ConstructL(const TRect& aRect)
   165 	{
   166 	
   167 	CreateWindowL();
   168 	SetBlank();
   169 
   170 	_LIT(KMyFontName,"Series 60 Hindi TitleSmB");	
   171 	TFontSpec hindiFontSpec(KMyFontName,200);
   172 	iFontSpec = hindiFontSpec;
   173 	SetFontSize(200);
   174 	
   175 	// first label
   176 	_LIT(KSomeHindi,"   " );
   177 	iTest = new(ELeave) CEikLabel;
   178 	iTest->SetContainerWindowL(*this);
   179 	iTest->SetBufferReserveLengthL(64);
   180 	iTest->SetTextL(KSomeHindi); 
   181 
   182 	// add a CEikRichTextEditor
   183 /*    TResourceReader reader;
   184     TBuf<500> buf;
   185     iCoeEnv->CreateResourceReaderLC(reader, R_OUTPUT_WINDOW_RTEXTED);
   186     iOutputWindow = new (ELeave) CEikRichTextEditor();
   187     iOutputWindow->SetContainerWindowL(*this);
   188     iOutputWindow->ConstructFromResourceL(reader);
   189     CleanupStack::PopAndDestroy();  // Resource reader
   190     iOutputWindow->SetFocus(ETrue);
   191 
   192     const TPoint KOutputPosition = TPoint(10, 35);
   193     const TSize  KOutputSize     = TSize(150, 100);
   194     iOutputWindow->SetExtent(KOutputPosition, KOutputSize); 
   195 
   196     buf.Append(_L("abc"));
   197     buf.Append(KHindi);
   198     buf.Append(_L(" xyz"));
   199     iOutputWindow->SetTextL(&buf); */
   200 
   201 	SetRect(aRect);
   202 	ActivateL();
   203 	iSample =1;
   204 	}
   205 
   206 CHindiContainer::~CHindiContainer()
   207 	{
   208 	delete iTest;
   209 	delete iOutputWindow;
   210 	}
   211 
   212 void CHindiContainer::SizeChanged()
   213 	{
   214 	TPoint pos = Position();
   215 	iTest->SetExtent(pos + TPoint(10,10), TSize(500, 40));
   216 	}
   217 
   218 TInt CHindiContainer::CountComponentControls() const
   219 	{
   220 	return 1 /* 2 */;
   221 	}
   222 
   223 CCoeControl* CHindiContainer::ComponentControl(TInt aIndex) const
   224 	{
   225 	CCoeControl* controls[] = { iTest/*, iOutputWindow */ };
   226 	return controls[aIndex];
   227 	}
   228 
   229 void CHindiContainer::HandleControlEventL(CCoeControl* /* aControl */,
   230 						TCoeEvent aEventType)
   231 	{
   232 	if (aEventType == EEventStateChanged)
   233 		{
   234 		//  AppUi()->Exit();
   235 		}
   236 	}
   237 
   238 void CHindiContainer::Draw(const TRect& aRect) const
   239 	{
   240 	TRect rect(Rect());
   241 	rect.Intersection(aRect);
   242 
   243 	// draw the text directly on the display
   244 	CWindowGc& gc = SystemGc();
   245 	DrawHindiText(gc);
   246 	}
   247 
   248 void CHindiContainer::ChangeSample( TInt aSample)
   249 	{
   250 	iSample = aSample;
   251 	if (iSample > 24 ) iSample = 1;
   252 	if (iSample < 1 ) iSample = 24;	
   253 	}
   254 
   255 TInt CHindiContainer::GetSample()
   256 	{
   257 	return iSample;
   258 	}
   259 
   260 void CHindiContainer::SetHindiFont( TFontSpec& aFontSpec )
   261 	{
   262 	iFontSpec = aFontSpec;
   263 	}
   264 
   265 void CHindiContainer::SetFontSize( TInt aFontSize )
   266 	{
   267 	iFontSize = aFontSize;
   268 	iFontSpec.iHeight = iFontSize;
   269 	}
   270 
   271 TInt CHindiContainer::GetFontSize()
   272 	{
   273 	return iFontSize;
   274 	}
   275 	
   276 	
   277 const TInt UnicodeZeroWidthNonJoiner = 0x200C;
   278 
   279 /* Display Hindi without shaping by inserting a Unicode Zero Width Non Joiner
   280 character bewteen each character
   281 aInput the Hindi text to be displayed
   282 aOutput the same text with the ZWNJ characters added, This buffer must be big enough
   283 */
   284 void CHindiContainer::DisableShaping(const TDesC* aInput, TDes& aOutput ) const
   285 	{
   286 	aOutput.Zero();
   287 	for (TInt i = 0; i < aInput->Length(); i++ )
   288 		{
   289 		aOutput.Append( aInput->Mid(i,1) );
   290 		aOutput.Append( UnicodeZeroWidthNonJoiner );
   291 		}
   292 	}
   293 
   294 /* create a text file which contains the sample hindi data
   295 this can be used for testing 
   296 */
   297 void CHindiContainer::CreateHindiTxtFile() const
   298 	{
   299 	RFs fs;
   300 	TInt error = KErrNone;
   301 	RFile file;
   302 	
   303 	// Open or create hindi.txt
   304 	error = fs.Connect();
   305 	error = file.Open(fs, _L("c:\\hindi.txt"), EFileWrite);
   306 	if ( error == KErrNotFound)
   307 		{
   308 		error = file.Create(fs, _L("c:\\hindi.txt"), EFileWrite);
   309 		}
   310 	
   311 	// load buffer with data to write
   312 	RBuf8 buffer;
   313 	buffer.Create(10000);
   314 	TPtrC16 pHindi(KHindi1);
   315 	buffer.Append( _L("\xff\xfe") ); 
   316 	buffer.Append((const unsigned char *)pHindi.Ptr(), pHindi.Size() ); 
   317 
   318 	TPtrC16 pHindi2(KHindi2);
   319 	buffer.Append((const unsigned char *)pHindi2.Ptr(), pHindi2.Size() ); 
   320 
   321 	TPtrC16 pHindi3(KHindi3);
   322 	buffer.Append((const unsigned char *)pHindi3.Ptr(), pHindi3.Size() ); 
   323 
   324 	TPtrC16 pHindi4(KHindi4);
   325 	buffer.Append((const unsigned char *)pHindi4.Ptr(), pHindi4.Size() ); 
   326 
   327 	TPtrC16 pHindi5(KHindi5);
   328 	buffer.Append((const unsigned char *)pHindi5.Ptr(), pHindi5.Size() ); 
   329 
   330 	TPtrC16 pHindi6(KHindi6);
   331 	buffer.Append((const unsigned char *)pHindi6.Ptr(), pHindi6.Size() ); 
   332 
   333 	TPtrC16 pHindi7(KHindi7);
   334 	buffer.Append((const unsigned char *)pHindi7.Ptr(), pHindi7.Size() ); 
   335 
   336 	TPtrC16 pHindi8(KHindi8);
   337 	buffer.Append((const unsigned char *)pHindi8.Ptr(), pHindi8.Size() ); 
   338 
   339 	TPtrC16 pHindi9(KHindi9);
   340 	buffer.Append((const unsigned char *)pHindi9.Ptr(), pHindi9.Size() ); 
   341 
   342 	// write buffer
   343 	error = file.Write(buffer);
   344 	
   345 	buffer.Close();
   346 	
   347 	file.Close();
   348 	fs.Close();
   349 	
   350 	}
   351 
   352 
   353 /* create a text file which contains the sample Kannada data
   354 this can be used for testing 
   355 */
   356 void CHindiContainer::CreateKannadaTxtFile() const
   357 	{
   358 	RFs fs;
   359 	TInt error = KErrNone;
   360 	RFile file;
   361 	
   362 	// Open or create Kannada.txt
   363 	error = fs.Connect();
   364 	error = file.Open(fs, _L("c:\\Kannada.txt"), EFileWrite);
   365 	if ( error == KErrNotFound)
   366 		{
   367 		error = file.Create(fs, _L("c:\\Kannada.txt"), EFileWrite);
   368 		}
   369 	
   370 	// load buffer with data to write
   371 //	TBuf8<10000> buffer;
   372 	RBuf8 buffer;
   373 	buffer.Create(10000);
   374 	TPtrC16 pKannada(KKannada1);
   375 	buffer.Append( _L("\xff\xfe") ); 
   376 	buffer.Append((const unsigned char *)pKannada.Ptr(), pKannada.Size() ); 
   377 
   378 	TPtrC16 pKannada2(KKannada2);
   379 	buffer.Append((const unsigned char *)pKannada2.Ptr(), pKannada2.Size() ); 
   380 
   381 	TPtrC16 pKannada3(KKannada3);
   382 	buffer.Append((const unsigned char *)pKannada3.Ptr(), pKannada3.Size() ); 
   383 
   384 	TPtrC16 pKannada4(KKannada4);
   385 	buffer.Append((const unsigned char *)pKannada4.Ptr(), pKannada4.Size() ); 
   386 
   387 	TPtrC16 pKannada5(KKannada5);
   388 	buffer.Append((const unsigned char *)pKannada5.Ptr(), pKannada5.Size() ); 
   389 
   390 	TPtrC16 pKannada6(KKannada6);
   391 	buffer.Append((const unsigned char *)pKannada6.Ptr(), pKannada6.Size() ); 
   392 
   393 	TPtrC16 pKannada7(KKannada7);
   394 	buffer.Append((const unsigned char *)pKannada7.Ptr(), pKannada7.Size() ); 
   395 
   396 	TPtrC16 pKannada8(KKannada8);
   397 	buffer.Append((const unsigned char *)pKannada8.Ptr(), pKannada8.Size() ); 
   398 
   399 	TPtrC16 pKannada9(KKannada9);
   400 	buffer.Append((const unsigned char *)pKannada9.Ptr(), pKannada9.Size() ); 
   401 
   402 	// write buffer
   403 	error = file.Write(buffer);
   404 
   405 	buffer.Close();
   406 	
   407 	file.Close();
   408 	fs.Close();
   409 	
   410 	}
   411 
   412 /* create a text file which contains the sample Gujarati data
   413 this can be used for testing 
   414 */
   415 void CHindiContainer::CreateGujaratiTxtFile() const
   416 	{
   417 	RFs fs;
   418 	TInt error = KErrNone;
   419 	RFile file;
   420 	
   421 	// Open or create Gujarati.txt
   422 	error = fs.Connect();
   423 	error = file.Open(fs, _L("c:\\Gujarati.txt"), EFileWrite);
   424 	if ( error == KErrNotFound)
   425 		{
   426 		error = file.Create(fs, _L("c:\\Gujarati.txt"), EFileWrite);
   427 		}
   428 	
   429 	// load buffer with data to write
   430 //	TBuf8<10000> buffer;
   431 	RBuf8 buffer;
   432 	buffer.Create(10000);
   433 	TPtrC16 pGujarati(KGujarati1);
   434 	buffer.Append( _L("\xff\xfe") ); 
   435 	buffer.Append((const unsigned char *)pGujarati.Ptr(), pGujarati.Size() ); 
   436 
   437 	TPtrC16 pGujarati2(KGujarati2);
   438 	buffer.Append((const unsigned char *)pGujarati2.Ptr(), pGujarati2.Size() ); 
   439 
   440 	TPtrC16 pGujarati3(KGujarati3);
   441 	buffer.Append((const unsigned char *)pGujarati3.Ptr(), pGujarati3.Size() ); 
   442 
   443 	TPtrC16 pGujarati4(KGujarati4);
   444 	buffer.Append((const unsigned char *)pGujarati4.Ptr(), pGujarati4.Size() ); 
   445 
   446 	TPtrC16 pGujarati5(KGujarati5);
   447 	buffer.Append((const unsigned char *)pGujarati5.Ptr(), pGujarati5.Size() ); 
   448 
   449 	TPtrC16 pGujarati6(KGujarati6);
   450 	buffer.Append((const unsigned char *)pGujarati6.Ptr(), pGujarati6.Size() ); 
   451 
   452 	TPtrC16 pGujarati7(KGujarati7);
   453 	buffer.Append((const unsigned char *)pGujarati7.Ptr(), pGujarati7.Size() ); 
   454 
   455 	TPtrC16 pGujarati8(KGujarati8);
   456 	buffer.Append((const unsigned char *)pGujarati8.Ptr(), pGujarati8.Size() ); 
   457 
   458 	TPtrC16 pGujarati9(KGujarati9);
   459 	buffer.Append((const unsigned char *)pGujarati9.Ptr(), pGujarati9.Size() ); 
   460 
   461 	// write buffer
   462 	error = file.Write(buffer);
   463 
   464 	buffer.Close();
   465 	
   466 	file.Close();
   467 	fs.Close();
   468 	}
   469 /* create a text file which contains the sample Bengali data
   470 this can be used for testing 
   471 */
   472 
   473 void CHindiContainer::CreateBengaliTxtFile() const
   474 	{
   475 	RFs fs1;
   476 	TInt error = KErrNone;
   477 	RFile file1;
   478 	// Open or create Bengali.txt
   479 	error = fs1.Connect();
   480 	error = file1.Open(fs1, _L("c:\\Bengali.txt"), EFileWrite);
   481 	if ( error == KErrNotFound)
   482 		{
   483 		error = file1.Create(fs1, _L("c:\\Bengali.txt"), EFileWrite);
   484 		}
   485 	// load buffer with data to write
   486 	RBuf8 buffer;
   487 	buffer.Create(10000);
   488 	TPtrC16 pBengali(KBengali1);
   489 	buffer.Append( _L("\xff\xfe")); 
   490 	buffer.Append((const unsigned char *)pBengali.Ptr(), pBengali.Size()); 
   491 	
   492 	TPtrC16 pBengali2(KBengali2);
   493 	buffer.Append((const unsigned char *)pBengali2.Ptr(), pBengali2.Size()); 
   494 	
   495 	TPtrC16 pBengali3(KBengali3);
   496 	buffer.Append((const unsigned char *)pBengali3.Ptr(), pBengali3.Size()); 
   497 	
   498 	TPtrC16 pBengali4(KBengali4);
   499 	buffer.Append((const unsigned char *)pBengali4.Ptr(), pBengali4.Size()); 
   500 	
   501 	TPtrC16 pBengali5(KBengali5);
   502 	buffer.Append((const unsigned char *)pBengali5.Ptr(), pBengali5.Size()); 
   503 	
   504 	TPtrC16 pBengali6(KBengali6);
   505 	buffer.Append((const unsigned char *)pBengali6.Ptr(), pBengali6.Size()); 
   506 	
   507 	TPtrC16 pBengali7(KBengali7);
   508 	buffer.Append((const unsigned char *)pBengali7.Ptr(), pBengali7.Size()); 
   509 	
   510 	TPtrC16 pBengali8(KBengali8);
   511 	buffer.Append((const unsigned char *)pBengali8.Ptr(), pBengali8.Size()); 
   512 	
   513 	TPtrC16 pBengali9(KBengali9);
   514 	buffer.Append((const unsigned char *)pBengali9.Ptr(), pBengali9.Size()); 
   515 	
   516 	// write buffer
   517 	error = file1.Write(buffer);
   518 	buffer.Close();
   519 	file1.Close();
   520 	fs1.Close();
   521 	}
   522 
   523 void CHindiContainer::CreateTamilTxtFile() const
   524 {
   525 RFs fs;
   526 TInt error = KErrNone;
   527 RFile file;
   528 
   529 // Open or create Tamil.txt
   530 error = fs.Connect();
   531 error = file.Open(fs, _L("c:\\Tamil.txt"), EFileWrite);
   532 if ( error == KErrNotFound)
   533 	{
   534 	error = file.Create(fs, _L("c:\\Tamil.txt"), EFileWrite);
   535 	}
   536 
   537 // load buffer with data to write
   538 //	TBuf8<10000> buffer;
   539 RBuf8 buffer;
   540 buffer.Create(10000);
   541 TPtrC16 pTamil(KTamil1);
   542 buffer.Append( _L("\xff\xfe") ); 
   543 buffer.Append((const unsigned char *)pTamil.Ptr(), pTamil.Size() ); 
   544 
   545 TPtrC16 pTamil2(KTamil2);
   546 buffer.Append((const unsigned char *)pTamil2.Ptr(), pTamil2.Size() ); 
   547 
   548 TPtrC16 pTamil3(KTamil3);
   549 buffer.Append((const unsigned char *)pTamil3.Ptr(), pTamil3.Size() ); 
   550 
   551 TPtrC16 pTamil4(KTamil4);
   552 buffer.Append((const unsigned char *)pTamil4.Ptr(), pTamil4.Size() ); 
   553 
   554 TPtrC16 pTamil5(KTamil5);
   555 buffer.Append((const unsigned char *)pTamil5.Ptr(), pTamil5.Size() ); 
   556 
   557 TPtrC16 pTamil6(KTamil6);
   558 buffer.Append((const unsigned char *)pTamil6.Ptr(), pTamil6.Size() ); 
   559 
   560 TPtrC16 pTamil7(KTamil7);
   561 buffer.Append((const unsigned char *)pTamil7.Ptr(), pTamil7.Size() ); 
   562 
   563 TPtrC16 pTamil8(KTamil8);
   564 buffer.Append((const unsigned char *)pTamil8.Ptr(), pTamil8.Size() ); 
   565 
   566 TPtrC16 pTamil9(KTamil9);
   567 buffer.Append((const unsigned char *)pTamil9.Ptr(), pTamil9.Size() ); 
   568 
   569 // write buffer
   570 error = file.Write(buffer);
   571 
   572 buffer.Close();
   573 
   574 file.Close();
   575 fs.Close();
   576 }
   577 
   578 void CHindiContainer::CreateTeluguTxtFile() const
   579 {
   580 RFs fs;
   581 TInt error = KErrNone;
   582 RFile file;
   583 
   584 // Open or create Telugu.txt
   585 error = fs.Connect();
   586 error = file.Open(fs, _L("c:\\Telugu.txt"), EFileWrite);
   587 if ( error == KErrNotFound)
   588 	{
   589 	error = file.Create(fs, _L("c:\\Telugu.txt"), EFileWrite);
   590 	}
   591 
   592 // load buffer with data to write
   593 //	TBuf8<10000> buffer;
   594 RBuf8 buffer;
   595 buffer.Create(10000);
   596 TPtrC16 pTelugu(KTelugu1);
   597 buffer.Append( _L("\xff\xfe") ); 
   598 buffer.Append((const unsigned char *)pTelugu.Ptr(), pTelugu.Size() ); 
   599 
   600 TPtrC16 pTelugu2(KTelugu2);
   601 buffer.Append((const unsigned char *)pTelugu2.Ptr(), pTelugu2.Size() ); 
   602 
   603 TPtrC16 pTelugu3(KTelugu3);
   604 buffer.Append((const unsigned char *)pTelugu3.Ptr(), pTelugu3.Size() ); 
   605 
   606 TPtrC16 pTelugu4(KTelugu4);
   607 buffer.Append((const unsigned char *)pTelugu4.Ptr(), pTelugu4.Size() ); 
   608 
   609 TPtrC16 pTelugu5(KTelugu5);
   610 buffer.Append((const unsigned char *)pTelugu5.Ptr(), pTelugu5.Size() ); 
   611 
   612 TPtrC16 pTelugu6(KTelugu6);
   613 buffer.Append((const unsigned char *)pTelugu6.Ptr(), pTelugu6.Size() ); 
   614 
   615 TPtrC16 pTelugu7(KTelugu7);
   616 buffer.Append((const unsigned char *)pTelugu7.Ptr(), pTelugu7.Size() ); 
   617 
   618 TPtrC16 pTelugu8(KTelugu8);
   619 buffer.Append((const unsigned char *)pTelugu8.Ptr(), pTelugu8.Size() ); 
   620 
   621 TPtrC16 pTelugu9(KTelugu9);
   622 buffer.Append((const unsigned char *)pTelugu9.Ptr(), pTelugu9.Size() ); 
   623 
   624 // write buffer
   625 error = file.Write(buffer);
   626 
   627 buffer.Close();
   628 
   629 file.Close();
   630 fs.Close();
   631 }
   632 
   633 /**
   634 @file
   635 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-1499			
   636 @SYMTestCaseDesc 			Test the IcuLayout Engine .
   637 @SYMTestPriority 			High
   638 @SYMTestActions  			Test Check that Hindi text is shaped:
   639 @SYMTestExpectedResults		The test must not fail.
   640 @SYMPREQ					PREQ18
   641 */ 
   642 
   643 /**
   644 @file
   645 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3382		
   646 @SYMTestCaseDesc 			Test the IcuLayout Engine for Kannada support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   647 @SYMTestPriority 			High
   648 @SYMTestActions  			Test Check that Kannada text is shaped:
   649 @SYMTestExpectedResults		The test must not fail.
   650 @SYMPREQ					PREQ19
   651 */
   652 /**
   653 @file
   654 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3418		
   655 @SYMTestCaseDesc 			Test the IcuLayout Engine for Gujarati support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   656 @SYMTestPriority 			High
   657 @SYMTestActions  			Test Check that gujarati text is shaped:
   658 @SYMTestExpectedResults		The test must not fail.
   659 @SYMPREQ					PREQ19
   660 */  
   661 
   662 /**
   663 @file
   664 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4004
   665 @SYMTestCaseDesc 			Test the IcuLayout Engine for Bengali support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   666 @SYMTestPriority 			High
   667 @SYMTestActions  			Test Check that Bengali text is shaped:
   668 @SYMTestExpectedResults		The test must not fail.
   669 @SYMPREQ					PREQ1766
   670 */
   671 
   672 /**
   673 @file
   674 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4005
   675 @SYMTestCaseDesc 			Test the IcuLayout Engine for Tamil support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   676 @SYMTestPriority 			High
   677 @SYMTestActions  			Test Check that Tamil text is shaped:
   678 @SYMTestExpectedResults		The test must not fail.
   679 @SYMPREQ					PREQ1766
   680 */  
   681 
   682 
   683 /**
   684 @file
   685 @SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4006
   686 @SYMTestCaseDesc 			Test the IcuLayout Engine for Telugu support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   687 @SYMTestPriority 			High
   688 @SYMTestActions  			Test Check that Telugu text is shaped:
   689 @SYMTestExpectedResults		The test must not fail.
   690 @SYMPREQ					PREQ1766
   691 */  
   692 
   693 void CHindiContainer::DrawHindiText(CWindowGc& aGc) const
   694 	{
   695 	
   696 	// start with test font
   697 	CFont* myFont;
   698 	_LIT(KTestFontName,"DejaVu Sans Condensed");
   699 	TFontSpec testFontSpec(KTestFontName,200); 
   700 	CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();
   701 	screenDevice->GetNearestFontInTwips(myFont,testFontSpec);
   702 
   703 	// set the required attributes
   704 	aGc.UseFont(myFont);
   705 	aGc.SetPenColor(KRgbBlack);
   706 	aGc.SetBrushColor(KRgbBlue);
   707 	aGc.CancelClippingRect();
   708 
   709 	// Set the text drawing position & draw
   710 	TPoint pos(10,20);
   711 	TBuf<100> textLine;
   712 	textLine.Append(_L("The following is "));
   713 	
   714 	switch( iSample )
   715 		{
   716 		case 1:
   717 			textLine.Append(_L("Hindi sample 1 "));
   718 			break;
   719 		case 2:
   720 			textLine.Append(_L("Hindi sample 2 "));
   721 			break;
   722 		case 3:
   723 			textLine.Append(_L("Hindi sample 3 "));
   724 			break;
   725 		case 4:
   726 			textLine.Append(_L(" Hindi Sample 4 "));
   727 			break;
   728 		case 5:
   729 			textLine.Append(_L("Kannada sample 1 "));
   730 			break;
   731 		case 6:
   732 			textLine.Append(_L("Kannada sample 2 "));
   733 			break;
   734 		case 7:
   735 			textLine.Append(_L("Kannada sample 3 "));
   736 			break;
   737 		case 8:
   738 			textLine.Append(_L("Kannada Sample 4 "));
   739 			break;
   740 		case 9:
   741 			textLine.Append(_L("Gujarati sample 1 "));
   742 			break;
   743 		case 10:
   744 			textLine.Append(_L("Gujarati sample 2 "));
   745 			break;
   746 		case 11:
   747 			textLine.Append(_L("Gujarati sample 3 "));
   748 			break;
   749 		case 12:
   750 			textLine.Append(_L("Gujarati Sample 4 "));
   751 			break;
   752 		case 13:
   753 			textLine.Append(_L("Bengali sample 1 "));
   754 			break;
   755 		case 14:
   756 			textLine.Append(_L("Bengali sample 2 "));
   757 			break;
   758 		case 15:
   759 			textLine.Append(_L("Bengali sample 3 "));
   760 			break;
   761 		case 16:
   762 			textLine.Append(_L("Bengali Sample 4 "));
   763 			break;
   764 		case 17:
   765 			textLine.Append(_L("Tamil sample 1 "));
   766 			break;
   767 		case 18:
   768 			textLine.Append(_L("Tamil sample 2 "));
   769 			break;
   770 		case 19:
   771 			textLine.Append(_L("Tamil sample 3 "));
   772 			break;
   773 		case 20:
   774 			textLine.Append(_L("Tamil Sample 4 "));
   775 			break;
   776 		case 21:
   777 			textLine.Append(_L("Telugu sample 1 "));
   778 			break;
   779 		case 22:
   780 			textLine.Append(_L("Telugu sample 2 "));
   781 			break;
   782 		case 23:
   783 			textLine.Append(_L("Telugu sample 3 "));
   784 			break;
   785 		case 24:
   786 			textLine.Append(_L("Telugu Sample 4 "));
   787 			break;
   788 		default:
   789 			textLine.Append(_L("what? "));
   790 			break;
   791 	 	}
   792 
   793 	textLine.Append(_L("using font "));
   794 	textLine.Append(iFontSpec.iTypeface.iName);
   795 	aGc.DrawText(textLine,pos);
   796 
   797 	TPoint pos2(10,35);
   798 	TBuf<100> textLine2;
   799 	textLine2.Format(_L("Size:%dpt Blue is shaped, Black is not"),iFontSize/20);
   800 	aGc.DrawText(textLine2, pos2);
   801 	
   802 	// Discard and destroy the test font
   803 	aGc.DiscardFont();
   804 	screenDevice->ReleaseFont(myFont);
   805 	
   806 	// set the selected font
   807 	screenDevice->GetNearestFontInTwips(myFont,iFontSpec);
   808 
   809 	// set the required attributes
   810 	aGc.UseFont(myFont);
   811 	aGc.SetPenColor(KRgbBlack);
   812 	aGc.SetBrushColor(KRgbBlue);
   813 	aGc.CancelClippingRect();
   814 
   815 	// some rectangles to fit the text in
   816 	TRect textRect(10,-30,600, 600);
   817 	TRect textRect2(10,-5,600, 600);
   818 	TRect textRect3(10, 25, 600, 600);
   819 	TRect textRect4(10, 50, 600, 600);
   820 	TRect textRect5(10, 80, 600, 600);
   821 	TRect textRect6(10, 105, 600, 600);
   822 
   823 	TBuf<200> textWithoutShaping;
   824 
   825 	// Draw some Hindi in a rectangle
   826 	switch (iSample)
   827 	{
   828 	
   829 		//Hindi Sample 1
   830 	case 1:
   831 	
   832 		// First draw in Black with shaping disabled
   833 		DisableShaping(&KHindi1, textWithoutShaping );
   834 		aGc.SetPenColor(KRgbBlack);
   835 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   836 
   837 		// Now in Blue with shaping
   838 		aGc.SetPenColor(KRgbBlue);
   839 		aGc.DrawText(KHindi1, textRect2, 100, CGraphicsContext::ELeft);
   840 	
   841 		//--------------------------------------------------------------------------
   842 		// Without the Layout Engine
   843 		aGc.SetPenColor(KRgbBlack);
   844 		DisableShaping(&KHindi2, textWithoutShaping );
   845 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   846 
   847 		aGc.SetPenColor(KRgbBlue);
   848 		aGc.DrawText(KHindi2, textRect4, 100, CGraphicsContext::ELeft);
   849 		//--------------------------------------------------------------------------
   850 		// Without the Layout Engine
   851 		DisableShaping(&KHindi3, textWithoutShaping );
   852 		aGc.SetPenColor(KRgbBlack);
   853 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   854 
   855 		aGc.SetPenColor(KRgbBlue);
   856 		aGc.DrawText(KHindi3, textRect6, 100, CGraphicsContext::ELeft);
   857 		//--------------------------------------------------------------------------
   858 		break;
   859 		//Hindi Sample 2
   860 	case 2:		
   861 		DisableShaping(&KHindi4, textWithoutShaping );
   862 		aGc.SetPenColor(KRgbBlack);
   863 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   864 
   865 		aGc.SetPenColor(KRgbBlue);
   866 		aGc.DrawText(KHindi4, textRect2, 100, CGraphicsContext::ELeft);
   867 	
   868 		//--------------------------------------------------------------------------
   869 		// Without the Layout Engine
   870 		DisableShaping(&KHindi5, textWithoutShaping );
   871 		aGc.SetPenColor(KRgbBlack);
   872 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   873 
   874 		aGc.SetPenColor(KRgbBlue);
   875 		aGc.DrawText(KHindi5, textRect4, 100, CGraphicsContext::ELeft);
   876 		//--------------------------------------------------------------------------
   877 		// Without the Layout Engine
   878 		DisableShaping(&KHindi6, textWithoutShaping );
   879 		aGc.SetPenColor(KRgbBlack);
   880 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   881 
   882 		aGc.SetPenColor(KRgbBlue);
   883 		aGc.DrawText(KHindi6, textRect6, 100, CGraphicsContext::ELeft);
   884 		//--------------------------------------------------------------------------
   885 		break;
   886 		//Hindi Sample 3
   887 	case 3:	
   888 		DisableShaping(&KHindi7, textWithoutShaping );
   889 		aGc.SetPenColor(KRgbBlack);
   890 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   891 
   892 		aGc.SetPenColor(KRgbBlue);
   893 		aGc.DrawText(KHindi7, textRect2, 100, CGraphicsContext::ELeft);
   894 	
   895 		//--------------------------------------------------------------------------
   896 		// Without the Layout Engine
   897 		DisableShaping(&KHindi8, textWithoutShaping );
   898 		aGc.SetPenColor(KRgbBlack);
   899 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   900 
   901 		aGc.SetPenColor(KRgbBlue);
   902 		aGc.DrawText(KHindi8, textRect4, 100, CGraphicsContext::ELeft);
   903 		//--------------------------------------------------------------------------
   904 		// Without the Layout Engine
   905 		DisableShaping(&KHindi9, textWithoutShaping );
   906 		aGc.SetPenColor(KRgbBlack);
   907 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   908 
   909 		aGc.SetPenColor(KRgbBlue);
   910 		aGc.DrawText(KHindi9, textRect6, 100, CGraphicsContext::ELeft);
   911 		//--------------------------------------------------------------------------
   912 		break;
   913 		//Hindi Sample 4
   914 	case 4:
   915 		// test 
   916 		DisableShaping(&KTest1, textWithoutShaping );
   917 		aGc.DrawText(KTest1, textRect, 100, CGraphicsContext::ELeft);
   918 
   919 		aGc.SetPenColor(KRgbBlue);
   920 		aGc.DrawText(KTest1, textRect2, 100, CGraphicsContext::ELeft);
   921 	
   922 		//--------------------------------------------------------------------------
   923 		// Without the Layout Engine
   924 
   925 		aGc.SetPenColor(KRgbBlack);
   926 		aGc.DrawText(KTest2, textRect3, 100, CGraphicsContext::ELeft);
   927 		// With the Layout Engine
   928 
   929 		aGc.SetPenColor(KRgbBlue);
   930 		aGc.DrawText(KTest2, textRect4, 100, CGraphicsContext::ELeft);
   931 		//--------------------------------------------------------------------------
   932 		// Without the Layout Engine
   933 
   934 		aGc.SetPenColor(KRgbBlack);
   935 		aGc.DrawText(KTest3, textRect5, 100, CGraphicsContext::ELeft);
   936 		// With the Layout Engine
   937 
   938 		aGc.SetPenColor(KRgbBlue);
   939 		aGc.DrawText(KTest3, textRect6, 100, CGraphicsContext::ELeft);
   940 		//--------------------------------------------------------------------------
   941 		break;
   942 		
   943 		//Kannada Sample 1
   944 	case 5:		
   945 	// First draw in Black with shaping disabled
   946 		DisableShaping(&KKannada1, textWithoutShaping );
   947 		aGc.SetPenColor(KRgbBlack);
   948 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   949 
   950 		// Now in Blue with shaping
   951 		aGc.SetPenColor(KRgbBlue);
   952 		aGc.DrawText(KKannada1, textRect2, 100, CGraphicsContext::ELeft);
   953 	
   954 		//--------------------------------------------------------------------------
   955 		// Without the Layout Engine
   956 		aGc.SetPenColor(KRgbBlack);
   957 		DisableShaping(&KKannada2, textWithoutShaping );
   958 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   959 
   960 		aGc.SetPenColor(KRgbBlue);
   961 		aGc.DrawText(KKannada2, textRect4, 100, CGraphicsContext::ELeft);
   962 		//--------------------------------------------------------------------------
   963 		// Without the Layout Engine
   964 		DisableShaping(&KKannada3, textWithoutShaping );
   965 		aGc.SetPenColor(KRgbBlack);
   966 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   967 
   968 		aGc.SetPenColor(KRgbBlue);
   969 		aGc.DrawText(KKannada3, textRect6, 100, CGraphicsContext::ELeft);
   970 		//--------------------------------------------------------------------------
   971 		break;
   972 		//Kannada Sample 2
   973 		
   974 	case 6:		
   975 		DisableShaping(&KKannada4, textWithoutShaping );
   976 		aGc.SetPenColor(KRgbBlack);
   977 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   978 
   979 		aGc.SetPenColor(KRgbBlue);
   980 		aGc.DrawText(KKannada4, textRect2, 100, CGraphicsContext::ELeft);
   981 	
   982 		//--------------------------------------------------------------------------
   983 		// Without the Layout Engine
   984 		DisableShaping(&KKannada5, textWithoutShaping );
   985 		aGc.SetPenColor(KRgbBlack);
   986 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   987 
   988 		aGc.SetPenColor(KRgbBlue);
   989 		aGc.DrawText(KKannada5, textRect4, 100, CGraphicsContext::ELeft);
   990 		//--------------------------------------------------------------------------
   991 		// Without the Layout Engine
   992 		DisableShaping(&KKannada6, textWithoutShaping );
   993 		aGc.SetPenColor(KRgbBlack);
   994 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   995 
   996 		aGc.SetPenColor(KRgbBlue);
   997 		aGc.DrawText(KKannada6, textRect6, 100, CGraphicsContext::ELeft);
   998 		//--------------------------------------------------------------------------
   999 		break;
  1000 		
  1001 		//Kannada Sample 3
  1002 	
  1003 	case 7:	
  1004 		DisableShaping(&KKannada7, textWithoutShaping );
  1005 		aGc.SetPenColor(KRgbBlack);
  1006 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1007 
  1008 		aGc.SetPenColor(KRgbBlue);
  1009 		aGc.DrawText(KKannada7, textRect2, 100, CGraphicsContext::ELeft);
  1010 	
  1011 		//--------------------------------------------------------------------------
  1012 		// Without the Layout Engine
  1013 		DisableShaping(&KKannada8, textWithoutShaping );
  1014 		aGc.SetPenColor(KRgbBlack);
  1015 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1016 
  1017 		aGc.SetPenColor(KRgbBlue);
  1018 		aGc.DrawText(KKannada8, textRect4, 100, CGraphicsContext::ELeft);
  1019 		//--------------------------------------------------------------------------
  1020 		// Without the Layout Engine
  1021 		DisableShaping(&KKannada9, textWithoutShaping );
  1022 		aGc.SetPenColor(KRgbBlack);
  1023 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1024 
  1025 		aGc.SetPenColor(KRgbBlue);
  1026 		aGc.DrawText(KKannada9, textRect6, 100, CGraphicsContext::ELeft);
  1027 		//--------------------------------------------------------------------------
  1028 		break;
  1029 		//Kannada Sample 4 	
  1030 	case 8:
  1031 		
  1032 		DisableShaping(&KTestKannada1, textWithoutShaping );
  1033 		aGc.DrawText(KTestKannada1, textRect, 100, CGraphicsContext::ELeft);
  1034 
  1035 		aGc.SetPenColor(KRgbBlue);
  1036 		aGc.DrawText(KTestKannada1, textRect2, 100, CGraphicsContext::ELeft);
  1037 	
  1038 		//--------------------------------------------------------------------------
  1039 		// Without the Layout Engine
  1040 
  1041 		aGc.SetPenColor(KRgbBlack);
  1042 		aGc.DrawText(KTestKannada2, textRect3, 100, CGraphicsContext::ELeft);
  1043 		// With the Layout Engine
  1044 
  1045 		aGc.SetPenColor(KRgbBlue);
  1046 		aGc.DrawText(KTestKannada2, textRect4, 100, CGraphicsContext::ELeft);
  1047 		//--------------------------------------------------------------------------
  1048 		// Without the Layout Engine
  1049 
  1050 		aGc.SetPenColor(KRgbBlack);
  1051 		aGc.DrawText(KTestKannada3, textRect5, 100, CGraphicsContext::ELeft);
  1052 		// With the Layout Engine
  1053 
  1054 		aGc.SetPenColor(KRgbBlue);
  1055 		aGc.DrawText(KTestKannada3, textRect6, 100, CGraphicsContext::ELeft);
  1056 		//--------------------------------------------------------------------------
  1057 		
  1058 		break;
  1059 	//	break;
  1060 	
  1061 	//Gujarati Sample 1
  1062 	case 9:		
  1063 	// First draw in Black with shaping disabled
  1064 		DisableShaping(&KGujarati1, textWithoutShaping );
  1065 		aGc.SetPenColor(KRgbBlack);
  1066 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1067 
  1068 		// Now in Blue with shaping
  1069 		aGc.SetPenColor(KRgbBlue);
  1070 		aGc.DrawText(KGujarati1, textRect2, 100, CGraphicsContext::ELeft);
  1071 	
  1072 		//--------------------------------------------------------------------------
  1073 		// Without the Layout Engine
  1074 		aGc.SetPenColor(KRgbBlack);
  1075 		DisableShaping(&KGujarati2, textWithoutShaping );
  1076 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1077 
  1078 		aGc.SetPenColor(KRgbBlue);
  1079 		aGc.DrawText(KGujarati2, textRect4, 100, CGraphicsContext::ELeft);
  1080 		//--------------------------------------------------------------------------
  1081 		// Without the Layout Engine
  1082 		DisableShaping(&KGujarati3, textWithoutShaping );
  1083 		aGc.SetPenColor(KRgbBlack);
  1084 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1085 
  1086 		aGc.SetPenColor(KRgbBlue);
  1087 		aGc.DrawText(KGujarati3, textRect6, 100, CGraphicsContext::ELeft);
  1088 		//--------------------------------------------------------------------------
  1089 		break;
  1090 		//Gujarati Sample 2
  1091 		
  1092 	case 10:		
  1093 		DisableShaping(&KGujarati4, textWithoutShaping );
  1094 		aGc.SetPenColor(KRgbBlack);
  1095 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1096 
  1097 		aGc.SetPenColor(KRgbBlue);
  1098 		aGc.DrawText(KGujarati4, textRect2, 100, CGraphicsContext::ELeft);
  1099 	
  1100 		//--------------------------------------------------------------------------
  1101 		// Without the Layout Engine
  1102 		DisableShaping(&KGujarati5, textWithoutShaping );
  1103 		aGc.SetPenColor(KRgbBlack);
  1104 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1105 
  1106 		aGc.SetPenColor(KRgbBlue);
  1107 		aGc.DrawText(KGujarati5, textRect4, 100, CGraphicsContext::ELeft);
  1108 		//--------------------------------------------------------------------------
  1109 		// Without the Layout Engine
  1110 		DisableShaping(&KGujarati6, textWithoutShaping );
  1111 		aGc.SetPenColor(KRgbBlack);
  1112 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1113 
  1114 		aGc.SetPenColor(KRgbBlue);
  1115 		aGc.DrawText(KGujarati6, textRect6, 100, CGraphicsContext::ELeft);
  1116 		//--------------------------------------------------------------------------
  1117 		break;
  1118 		
  1119 		//Gujarati Sample 3
  1120 	
  1121 	case 11:	
  1122 		DisableShaping(&KGujarati7, textWithoutShaping );
  1123 		aGc.SetPenColor(KRgbBlack);
  1124 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1125 
  1126 		aGc.SetPenColor(KRgbBlue);
  1127 		aGc.DrawText(KGujarati7, textRect2, 100, CGraphicsContext::ELeft);
  1128 	
  1129 		//--------------------------------------------------------------------------
  1130 		// Without the Layout Engine
  1131 		DisableShaping(&KGujarati8, textWithoutShaping );
  1132 		aGc.SetPenColor(KRgbBlack);
  1133 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1134 
  1135 		aGc.SetPenColor(KRgbBlue);
  1136 		aGc.DrawText(KGujarati8, textRect4, 100, CGraphicsContext::ELeft);
  1137 		//--------------------------------------------------------------------------
  1138 		// Without the Layout Engine
  1139 		DisableShaping(&KGujarati9, textWithoutShaping );
  1140 		aGc.SetPenColor(KRgbBlack);
  1141 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1142 
  1143 		aGc.SetPenColor(KRgbBlue);
  1144 		aGc.DrawText(KGujarati9, textRect6, 100, CGraphicsContext::ELeft);
  1145 		//--------------------------------------------------------------------------
  1146 		break;
  1147 		//Gujarati Sample 4 	
  1148 	case 12:
  1149 		
  1150 		DisableShaping(&KTestGujarati1, textWithoutShaping );
  1151 		aGc.DrawText(KTestGujarati1, textRect, 100, CGraphicsContext::ELeft);
  1152 
  1153 		aGc.SetPenColor(KRgbBlue);
  1154 		aGc.DrawText(KTestGujarati1, textRect2, 100, CGraphicsContext::ELeft);
  1155 	
  1156 		//--------------------------------------------------------------------------
  1157 		// Without the Layout Engine
  1158 
  1159 		aGc.SetPenColor(KRgbBlack);
  1160 		aGc.DrawText(KTestGujarati2, textRect3, 100, CGraphicsContext::ELeft);
  1161 		// With the Layout Engine
  1162 
  1163 		aGc.SetPenColor(KRgbBlue);
  1164 		aGc.DrawText(KTestGujarati2, textRect4, 100, CGraphicsContext::ELeft);
  1165 		//--------------------------------------------------------------------------
  1166 		// Without the Layout Engine
  1167 
  1168 		aGc.SetPenColor(KRgbBlack);
  1169 		aGc.DrawText(KTestGujarati3, textRect5, 100, CGraphicsContext::ELeft);
  1170 		// With the Layout Engine
  1171 
  1172 		aGc.SetPenColor(KRgbBlue);
  1173 		aGc.DrawText(KTestGujarati3, textRect6, 100, CGraphicsContext::ELeft);
  1174 		//--------------------------------------------------------------------------
  1175 		
  1176 		break;
  1177 		//Bengali Sample 1
  1178 	case 13:		
  1179 	// First draw in Black with shaping disabled
  1180 		DisableShaping(&KBengali1, textWithoutShaping );
  1181 		aGc.SetPenColor(KRgbBlack);
  1182 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1183 
  1184 		// Now in Blue with shaping
  1185 		aGc.SetPenColor(KRgbBlue);
  1186 		aGc.DrawText(KBengali1, textRect2, 100, CGraphicsContext::ELeft);
  1187 	
  1188 		//--------------------------------------------------------------------------
  1189 		// Without the Layout Engine
  1190 		aGc.SetPenColor(KRgbBlack);
  1191 		DisableShaping(&KBengali2, textWithoutShaping );
  1192 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1193 
  1194 		aGc.SetPenColor(KRgbBlue);
  1195 		aGc.DrawText(KBengali2, textRect4, 100, CGraphicsContext::ELeft);
  1196 		//--------------------------------------------------------------------------
  1197 		// Without the Layout Engine
  1198 		DisableShaping(&KBengali3, textWithoutShaping );
  1199 		aGc.SetPenColor(KRgbBlack);
  1200 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1201 
  1202 		aGc.SetPenColor(KRgbBlue);
  1203 		aGc.DrawText(KBengali3, textRect6, 100, CGraphicsContext::ELeft);
  1204 		//--------------------------------------------------------------------------
  1205 		break;
  1206 		//Bengali Sample 2
  1207 		
  1208 	case 14:		
  1209 		DisableShaping(&KBengali4, textWithoutShaping );
  1210 		aGc.SetPenColor(KRgbBlack);
  1211 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1212 
  1213 		aGc.SetPenColor(KRgbBlue);
  1214 		aGc.DrawText(KBengali4, textRect2, 100, CGraphicsContext::ELeft);
  1215 	
  1216 		//--------------------------------------------------------------------------
  1217 		// Without the Layout Engine
  1218 		DisableShaping(&KBengali5, textWithoutShaping );
  1219 		aGc.SetPenColor(KRgbBlack);
  1220 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1221 
  1222 		aGc.SetPenColor(KRgbBlue);
  1223 		aGc.DrawText(KBengali5, textRect4, 100, CGraphicsContext::ELeft);
  1224 		//--------------------------------------------------------------------------
  1225 		// Without the Layout Engine
  1226 		DisableShaping(&KBengali6, textWithoutShaping );
  1227 		aGc.SetPenColor(KRgbBlack);
  1228 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1229 
  1230 		aGc.SetPenColor(KRgbBlue);
  1231 		aGc.DrawText(KBengali6, textRect6, 100, CGraphicsContext::ELeft);
  1232 		//--------------------------------------------------------------------------
  1233 		break;
  1234 		
  1235 		//Bengali Sample 3
  1236 	
  1237 	case 15:	
  1238 		DisableShaping(&KBengali7, textWithoutShaping );
  1239 		aGc.SetPenColor(KRgbBlack);
  1240 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1241 
  1242 		aGc.SetPenColor(KRgbBlue);
  1243 		aGc.DrawText(KBengali7, textRect2, 100, CGraphicsContext::ELeft);
  1244 	
  1245 		//--------------------------------------------------------------------------
  1246 		// Without the Layout Engine
  1247 		DisableShaping(&KBengali8, textWithoutShaping );
  1248 		aGc.SetPenColor(KRgbBlack);
  1249 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1250 
  1251 		aGc.SetPenColor(KRgbBlue);
  1252 		aGc.DrawText(KBengali8, textRect4, 100, CGraphicsContext::ELeft);
  1253 		//--------------------------------------------------------------------------
  1254 		// Without the Layout Engine
  1255 		DisableShaping(&KBengali9, textWithoutShaping );
  1256 		aGc.SetPenColor(KRgbBlack);
  1257 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1258 
  1259 		aGc.SetPenColor(KRgbBlue);
  1260 		aGc.DrawText(KBengali9, textRect6, 100, CGraphicsContext::ELeft);
  1261 		//--------------------------------------------------------------------------
  1262 		break;
  1263 		//Bengali Sample 4 	
  1264 	case 16:
  1265 		
  1266 		DisableShaping(&KTestBengali1, textWithoutShaping );
  1267 		aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
  1268 
  1269 		aGc.SetPenColor(KRgbBlue);
  1270 		aGc.DrawText(KTestBengali1, textRect2, 100, CGraphicsContext::ELeft);
  1271 	
  1272 		//--------------------------------------------------------------------------
  1273 		// Without the Layout Engine
  1274 
  1275 		aGc.SetPenColor(KRgbBlack);
  1276 		aGc.DrawText(KTestBengali2, textRect3, 100, CGraphicsContext::ELeft);
  1277 		// With the Layout Engine
  1278 
  1279 		aGc.SetPenColor(KRgbBlue);
  1280 		aGc.DrawText(KTestBengali2, textRect4, 100, CGraphicsContext::ELeft);
  1281 		//--------------------------------------------------------------------------
  1282 		// Without the Layout Engine
  1283 
  1284 		aGc.SetPenColor(KRgbBlack);
  1285 		aGc.DrawText(KTestBengali3, textRect5, 100, CGraphicsContext::ELeft);
  1286 		// With the Layout Engine
  1287 
  1288 		aGc.SetPenColor(KRgbBlue);
  1289 		aGc.DrawText(KTestBengali3, textRect6, 100, CGraphicsContext::ELeft);
  1290 		//--------------------------------------------------------------------------
  1291 		
  1292 		break;	
  1293 		
  1294 	case 17:
  1295 	//Tamil Sample 1
  1296 	// First draw in Black with shaping disabled
  1297 		DisableShaping(&KTamil1, textWithoutShaping );
  1298 		aGc.SetPenColor(KRgbBlack);
  1299 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1300 
  1301 		// Now in Blue with shaping
  1302 		aGc.SetPenColor(KRgbBlue);
  1303 		aGc.DrawText(KTamil1, textRect2, 100, CGraphicsContext::ELeft);
  1304 	
  1305 		//--------------------------------------------------------------------------
  1306 		// Without the Layout Engine
  1307 		aGc.SetPenColor(KRgbBlack);
  1308 		DisableShaping(&KTamil2, textWithoutShaping );
  1309 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1310 
  1311 		aGc.SetPenColor(KRgbBlue);
  1312 		aGc.DrawText(KTamil2, textRect4, 100, CGraphicsContext::ELeft);
  1313 		//--------------------------------------------------------------------------
  1314 		// Without the Layout Engine
  1315 		DisableShaping(&KTamil3, textWithoutShaping );
  1316 		aGc.SetPenColor(KRgbBlack);
  1317 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1318 
  1319 		aGc.SetPenColor(KRgbBlue);
  1320 		aGc.DrawText(KTamil3, textRect6, 100, CGraphicsContext::ELeft);
  1321 		//--------------------------------------------------------------------------
  1322 		break;
  1323 	case 18:		
  1324 	//Tamil Sample 2
  1325 	// First draw in Black with shaping disabled
  1326 		DisableShaping(&KTamil4, textWithoutShaping );
  1327 		aGc.SetPenColor(KRgbBlack);
  1328 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1329 
  1330 		aGc.SetPenColor(KRgbBlue);
  1331 		aGc.DrawText(KTamil4, textRect2, 100, CGraphicsContext::ELeft);
  1332 	
  1333 		//--------------------------------------------------------------------------
  1334 		// Without the Layout Engine
  1335 		DisableShaping(&KTamil5, textWithoutShaping );
  1336 		aGc.SetPenColor(KRgbBlack);
  1337 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1338 
  1339 		aGc.SetPenColor(KRgbBlue);
  1340 		aGc.DrawText(KTamil5, textRect4, 100, CGraphicsContext::ELeft);
  1341 		//--------------------------------------------------------------------------
  1342 		// Without the Layout Engine
  1343 		DisableShaping(&KTamil6, textWithoutShaping );
  1344 		aGc.SetPenColor(KRgbBlack);
  1345 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1346 
  1347 		aGc.SetPenColor(KRgbBlue);
  1348 		aGc.DrawText(KTamil6, textRect6, 100, CGraphicsContext::ELeft);
  1349 		//--------------------------------------------------------------------------
  1350 		break;
  1351 				
  1352 	case 19:
  1353 	//Tamil Sample 3
  1354 	// First draw in Black with shaping disabled
  1355 		DisableShaping(&KTamil7, textWithoutShaping );
  1356 		aGc.SetPenColor(KRgbBlack);
  1357 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1358 
  1359 		aGc.SetPenColor(KRgbBlue);
  1360 		aGc.DrawText(KTamil7, textRect2, 100, CGraphicsContext::ELeft);
  1361 	
  1362 		//--------------------------------------------------------------------------
  1363 		// Without the Layout Engine
  1364 		DisableShaping(&KTamil8, textWithoutShaping );
  1365 		aGc.SetPenColor(KRgbBlack);
  1366 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1367 
  1368 		aGc.SetPenColor(KRgbBlue);
  1369 		aGc.DrawText(KTamil8, textRect4, 100, CGraphicsContext::ELeft);
  1370 		//--------------------------------------------------------------------------
  1371 		// Without the Layout Engine
  1372 		DisableShaping(&KTamil9, textWithoutShaping );
  1373 		aGc.SetPenColor(KRgbBlack);
  1374 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1375 
  1376 		aGc.SetPenColor(KRgbBlue);
  1377 		aGc.DrawText(KTamil9, textRect6, 100, CGraphicsContext::ELeft);
  1378 		//--------------------------------------------------------------------------
  1379 		break;
  1380 	case 20:
  1381 	//Tamil Sample 4
  1382 	// First draw in Black with shaping disabled
  1383 		DisableShaping(&KTestTamil1, textWithoutShaping );
  1384 		aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
  1385 
  1386 		aGc.SetPenColor(KRgbBlue);
  1387 		aGc.DrawText(KTestTamil1, textRect2, 100, CGraphicsContext::ELeft);
  1388 	
  1389 		//--------------------------------------------------------------------------
  1390 		// Without the Layout Engine
  1391 
  1392 		aGc.SetPenColor(KRgbBlack);
  1393 		aGc.DrawText(KTestTamil2, textRect3, 100, CGraphicsContext::ELeft);
  1394 		// With the Layout Engine
  1395 
  1396 		aGc.SetPenColor(KRgbBlue);
  1397 		aGc.DrawText(KTestTamil2, textRect4, 100, CGraphicsContext::ELeft);
  1398 		//--------------------------------------------------------------------------
  1399 		// Without the Layout Engine
  1400 
  1401 		aGc.SetPenColor(KRgbBlack);
  1402 		aGc.DrawText(KTestTamil3, textRect5, 100, CGraphicsContext::ELeft);
  1403 		// With the Layout Engine
  1404 
  1405 		aGc.SetPenColor(KRgbBlue);
  1406 		aGc.DrawText(KTestTamil3, textRect6, 100, CGraphicsContext::ELeft);
  1407 		//--------------------------------------------------------------------------
  1408 		
  1409 		break;	
  1410 		
  1411 	case 21:	
  1412 	//Telugu Sample 1
  1413 	// First draw in Black with shaping disabled
  1414 		DisableShaping(&KTelugu1, textWithoutShaping );
  1415 		aGc.SetPenColor(KRgbBlack);
  1416 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1417 
  1418 		// Now in Blue with shaping
  1419 		aGc.SetPenColor(KRgbBlue);
  1420 		aGc.DrawText(KTelugu1, textRect2, 100, CGraphicsContext::ELeft);
  1421 	
  1422 		//--------------------------------------------------------------------------
  1423 		// Without the Layout Engine
  1424 		aGc.SetPenColor(KRgbBlack);
  1425 		DisableShaping(&KTelugu2, textWithoutShaping );
  1426 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1427 
  1428 		aGc.SetPenColor(KRgbBlue);
  1429 		aGc.DrawText(KTelugu2, textRect4, 100, CGraphicsContext::ELeft);
  1430 		//--------------------------------------------------------------------------
  1431 		// Without the Layout Engine
  1432 		DisableShaping(&KTelugu3, textWithoutShaping );
  1433 		aGc.SetPenColor(KRgbBlack);
  1434 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1435 
  1436 		aGc.SetPenColor(KRgbBlue);
  1437 		aGc.DrawText(KTelugu3, textRect6, 100, CGraphicsContext::ELeft);
  1438 		//--------------------------------------------------------------------------
  1439 		break;
  1440 				
  1441 	case 22:
  1442 	//Telugu Sample 2
  1443 	// First draw in Black with shaping disabled
  1444 		DisableShaping(&KTelugu4, textWithoutShaping );
  1445 		aGc.SetPenColor(KRgbBlack);
  1446 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1447 
  1448 		aGc.SetPenColor(KRgbBlue);
  1449 		aGc.DrawText(KTelugu4, textRect2, 100, CGraphicsContext::ELeft);
  1450 	
  1451 		//--------------------------------------------------------------------------
  1452 		// Without the Layout Engine
  1453 		DisableShaping(&KTelugu5, textWithoutShaping );
  1454 		aGc.SetPenColor(KRgbBlack);
  1455 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1456 
  1457 		aGc.SetPenColor(KRgbBlue);
  1458 		aGc.DrawText(KTelugu5, textRect4, 100, CGraphicsContext::ELeft);
  1459 		//--------------------------------------------------------------------------
  1460 		// Without the Layout Engine
  1461 		DisableShaping(&KTelugu6, textWithoutShaping );
  1462 		aGc.SetPenColor(KRgbBlack);
  1463 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1464 
  1465 		aGc.SetPenColor(KRgbBlue);
  1466 		aGc.DrawText(KTelugu6, textRect6, 100, CGraphicsContext::ELeft);
  1467 		//--------------------------------------------------------------------------
  1468 		break;
  1469 					
  1470 	case 23:
  1471 	//Telugu Sample 3
  1472 	// First draw in Black with shaping disabled
  1473 		DisableShaping(&KTelugu7, textWithoutShaping );
  1474 		aGc.SetPenColor(KRgbBlack);
  1475 		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1476 
  1477 		aGc.SetPenColor(KRgbBlue);
  1478 		aGc.DrawText(KTelugu7, textRect2, 100, CGraphicsContext::ELeft);
  1479 	
  1480 		//--------------------------------------------------------------------------
  1481 		// Without the Layout Engine
  1482 		DisableShaping(&KTelugu8, textWithoutShaping );
  1483 		aGc.SetPenColor(KRgbBlack);
  1484 		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1485 
  1486 		aGc.SetPenColor(KRgbBlue);
  1487 		aGc.DrawText(KTelugu8, textRect4, 100, CGraphicsContext::ELeft);
  1488 		//--------------------------------------------------------------------------
  1489 		// Without the Layout Engine
  1490 		DisableShaping(&KTelugu9, textWithoutShaping );
  1491 		aGc.SetPenColor(KRgbBlack);
  1492 		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1493 
  1494 		aGc.SetPenColor(KRgbBlue);
  1495 		aGc.DrawText(KTelugu9, textRect6, 100, CGraphicsContext::ELeft);
  1496 		//--------------------------------------------------------------------------
  1497 		break;
  1498 		
  1499 	case 24:
  1500 	//Telugu Sample 4
  1501 	// First draw in Black with shaping disabled		
  1502 		DisableShaping(&KTestTelugu1, textWithoutShaping );
  1503 		aGc.DrawText(KTestTelugu1, textRect, 100, CGraphicsContext::ELeft);
  1504 
  1505 		aGc.SetPenColor(KRgbBlue);
  1506 		aGc.DrawText(KTestTelugu1, textRect2, 100, CGraphicsContext::ELeft);
  1507 	
  1508 		//--------------------------------------------------------------------------
  1509 		// Without the Layout Engine
  1510 
  1511 		aGc.SetPenColor(KRgbBlack);
  1512 		aGc.DrawText(KTestTelugu2, textRect3, 100, CGraphicsContext::ELeft);
  1513 		// With the Layout Engine
  1514 
  1515 		aGc.SetPenColor(KRgbBlue);
  1516 		aGc.DrawText(KTestTelugu2, textRect4, 100, CGraphicsContext::ELeft);
  1517 		//--------------------------------------------------------------------------
  1518 		// Without the Layout Engine
  1519 
  1520 		aGc.SetPenColor(KRgbBlack);
  1521 		aGc.DrawText(KTestTelugu3, textRect5, 100, CGraphicsContext::ELeft);
  1522 		// With the Layout Engine
  1523 
  1524 		aGc.SetPenColor(KRgbBlue);
  1525 		aGc.DrawText(KTestTelugu3, textRect6, 100, CGraphicsContext::ELeft);
  1526 		//--------------------------------------------------------------------------
  1527 		break;	
  1528 	default:
  1529 		break;		
  1530 	}
  1531 	// Discard and destroy the font
  1532 	aGc.DiscardFont();
  1533 	screenDevice->ReleaseFont(myFont);
  1534 	}
  1535 
  1536 // CHindiAppUi
  1537 
  1538 CHindiAppUi::~CHindiAppUi()
  1539 	{
  1540 	RemoveFromStack(iAppView);
  1541 	delete iAppView;
  1542 	}
  1543 
  1544 void CHindiAppUi::ConstructL()
  1545 	{
  1546 	BaseConstructL();
  1547 	iAppView=new(ELeave) CHindiContainer;
  1548 	iAppView->ConstructL(ClientRect());
  1549 	AddToStackL(iAppView);
  1550 	}
  1551 
  1552 void CHindiAppUi::HandleCommandL(TInt aCommand)
  1553 	{
  1554 	TCharFormat charFormat;
  1555 	TCharFormatMask charMask;
  1556 	
  1557 	switch (aCommand)
  1558 		{
  1559 		case EEikCmdExit:
  1560 			Exit();
  1561 			break;
  1562 			
  1563 		case EEikCmdFont:
  1564 			if ( CEikFontDialog::RunDlgLD(charFormat, charMask, EGulNoSymbolFonts, iCoeEnv->ScreenDevice()) )
  1565 				{
  1566 				// save the selected font in the view
  1567 				iAppView->SetHindiFont( charFormat.iFontSpec );
  1568 				iAppView->DrawNow();
  1569 				}
  1570 			break;
  1571 			
  1572 		case EEikCmdSample1:
  1573 			iAppView->ChangeSample(1);
  1574 			iAppView->DrawNow();
  1575 			break;
  1576 		case EEikCmdSample2:
  1577 			iAppView->ChangeSample(2);
  1578 			iAppView->DrawNow();
  1579 			break;
  1580 		case EEikCmdSample3:
  1581 			iAppView->ChangeSample(3);
  1582 			iAppView->DrawNow();
  1583 			break;
  1584 		case EEikCmdSample4:
  1585 			iAppView->ChangeSample(4);
  1586 			iAppView->DrawNow();
  1587 			break;
  1588 		case EEikCmdSample5:
  1589 			iAppView->ChangeSample(5);
  1590 			iAppView->DrawNow();
  1591 			break;
  1592 		case EEikCmdSample6:
  1593 			iAppView->ChangeSample(6);
  1594 			iAppView->DrawNow();
  1595 			break;
  1596 		case EEikCmdSample7:
  1597 			iAppView->ChangeSample(7);
  1598 			iAppView->DrawNow();
  1599 			break;
  1600 		case EEikCmdSample8:
  1601 			iAppView->ChangeSample(8);
  1602 			iAppView->DrawNow();
  1603 			break;
  1604 		case EEikCmdSample9:
  1605 			iAppView->ChangeSample(9);
  1606 			iAppView->DrawNow();
  1607 			break;
  1608 		case EEikCmdSample10:
  1609 			iAppView->ChangeSample(10);
  1610 			iAppView->DrawNow();
  1611 			break;
  1612 		case EEikCmdSample11:
  1613 			iAppView->ChangeSample(11);
  1614 			iAppView->DrawNow();
  1615 			break;
  1616 		case EEikCmdSample12:
  1617 			iAppView->ChangeSample(12);
  1618 			iAppView->DrawNow();
  1619 		case EEikCmdSample13:
  1620 			iAppView->ChangeSample(13);
  1621 			iAppView->DrawNow();
  1622 			break;
  1623 		case EEikCmdSample14:
  1624 			iAppView->ChangeSample(14);
  1625 			iAppView->DrawNow();
  1626 			break;
  1627 		case EEikCmdSample15:
  1628 			iAppView->ChangeSample(15);
  1629 			iAppView->DrawNow();
  1630 			break;
  1631 		case EEikCmdSample16:
  1632 			iAppView->ChangeSample(16);
  1633 			iAppView->DrawNow();
  1634 			break;
  1635 		case EEikCmdSample17:
  1636 			iAppView->ChangeSample(17);
  1637 			iAppView->DrawNow();
  1638 			break;
  1639 		case EEikCmdSample18:
  1640 			iAppView->ChangeSample(18);
  1641 			iAppView->DrawNow();
  1642 			break;
  1643 		case EEikCmdSample19:
  1644 			iAppView->ChangeSample(19);
  1645 			iAppView->DrawNow();
  1646 			break;
  1647 		case EEikCmdSample20:
  1648 			iAppView->ChangeSample(20);
  1649 			iAppView->DrawNow();
  1650 			break;
  1651 		case EEikCmdSample21:
  1652 			iAppView->ChangeSample(21);
  1653 			iAppView->DrawNow();
  1654 			break;
  1655 		case EEikCmdSample22:
  1656 			iAppView->ChangeSample(22);
  1657 			iAppView->DrawNow();
  1658 			break;
  1659 		case EEikCmdSample23:
  1660 			iAppView->ChangeSample(23);
  1661 			iAppView->DrawNow();
  1662 			break;
  1663 		case EEikCmdSample24:
  1664 			iAppView->ChangeSample(24);
  1665 			iAppView->DrawNow();
  1666 			break;
  1667 		case EEikCmdMakeHindiTxt:
  1668 			iAppView->CreateHindiTxtFile();
  1669 			break;
  1670 		case EEikCmdMakeKannadaTxt:
  1671 			iAppView->CreateKannadaTxtFile();
  1672 			break;
  1673 		case EEikCmdMakeGujaratiTxt:
  1674 			iAppView->CreateGujaratiTxtFile();
  1675 			break;
  1676 		case EEikCmdMakeBengaliTxt:
  1677 		 	iAppView->CreateBengaliTxtFile();
  1678 		 	break;
  1679 		case EEikCmdMakeTamilTxt:
  1680 		 	iAppView->CreateTamilTxtFile();
  1681 		 	break;	
  1682 		case EEikCmdMakeTeluguTxt:
  1683 		 	iAppView->CreateTeluguTxtFile();
  1684 		 	break;		 	
  1685 		default:
  1686 		  	Panic(0);
  1687 			break;
  1688 		}
  1689 	}
  1690 
  1691 TKeyResponse CHindiAppUi::HandleKeyEventL(const TKeyEvent&  aKeyEvent, TEventCode /* aType */)
  1692 	{
  1693 	  	switch (aKeyEvent.iCode) 
  1694   		{
  1695   	  	case EKeyUpArrow:
  1696  			// increase font size
  1697  			iAppView->SetFontSize(iAppView->GetFontSize() +20);
  1698  			break;
  1699   	  	case EKeyDownArrow:
  1700  			// increase font size
  1701  			iAppView->SetFontSize(iAppView->GetFontSize() -20);
  1702  			break;
  1703    	  	case EKeyLeftArrow:
  1704    	  		// next sample
  1705 			iAppView->ChangeSample(iAppView->GetSample()-1);
  1706  			break;
  1707    	  	case EKeyRightArrow:
  1708  			// increase font size
  1709 			iAppView->ChangeSample(iAppView->GetSample()+1);
  1710  			break;
  1711 	  	default:
  1712 	   		return EKeyWasNotConsumed;
  1713 	   	}
  1714 	iAppView->DrawNow();
  1715 	return EKeyWasConsumed;  	
  1716 	}
  1717 
  1718 // CHindiEikDocument
  1719 
  1720 CEikAppUi* CHindiEikDocument::CreateAppUiL()
  1721 	{
  1722 	return(new(ELeave) CHindiAppUi);
  1723 	}
  1724 
  1725 void CHindiEikDocument::ConstructL()
  1726 	{
  1727 	}
  1728 
  1729 
  1730 // CHindiApplication
  1731 
  1732 TUid CHindiApplication::AppDllUid() const
  1733 	{
  1734 	return KUidHindiDemoApp;
  1735 	}
  1736 
  1737 CApaDocument* CHindiApplication::CreateDocumentL()
  1738 	{
  1739 	CHindiEikDocument* document=new(ELeave) CHindiEikDocument(*this);
  1740 	CleanupStack::PushL(document);
  1741 	document->ConstructL();
  1742 	CleanupStack::Pop();
  1743 	return(document);
  1744 	}
  1745 
  1746 //
  1747 // EXPORTed functions
  1748 //
  1749 
  1750 // for MCL build 
  1751 #ifdef __SECURE_DATA__
  1752 
  1753 static CApaApplication* NewApplication()
  1754 	{
  1755 	return new CHindiApplication;
  1756 	}
  1757 
  1758 GLDEF_C TInt E32Main()
  1759 	{
  1760 	return EikStart::RunApplication(&NewApplication);
  1761 	}
  1762 
  1763 #else
  1764 
  1765 // for 8.1 build
  1766 EXPORT_C CApaApplication* NewApplication()
  1767 	{
  1768 	return new CHindiApplication;
  1769 	}
  1770 	
  1771 GLDEF_C TInt E32Dll(TDllReason)
  1772 	{
  1773 	return KErrNone;
  1774 	}
  1775 	
  1776 #endif