graphicstools/bitmapfonttools/src/FNTTRAN.CPP
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 /*
       
     2 * Copyright (c) 1997-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 * Header FNTTRAN.CPP
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "FNTREADR.H"
       
    21 
       
    22 bool OutputUnicode = true;
       
    23 
       
    24 // Input and output filenames entered in command line
       
    25 int main(int argc, char *argv[])
       
    26 	{
       
    27 	cout << "\nFNTTRAN V";
       
    28 	cout << KFnttranVersion << "\n";
       
    29 	cout << "Copyright (c) 1998-2005 Symbian Software Ltd.\n";
       
    30 
       
    31 	if(argc<3)
       
    32 		{
       
    33 		cout << "Usage:	FNTTRAN srcfile [srcfile2 ...] destfile\n";
       
    34 		cout << "where srcfile is the file containing typeface information,\n";
       
    35 		cout << "and the font bitmaps, and destfile is the font store file.\n";
       
    36 		return -1;
       
    37 		}
       
    38 	
       
    39 	FontReader reader;
       
    40 
       
    41 	for (int i = 1; i < (argc - 1); i++)
       
    42 		{
       
    43 		if (!reader.Read(argv[i]))
       
    44 			{
       
    45 			cerr << "Problem encountered in file " << argv[i] << "\n";
       
    46 			return -1;
       
    47 			}
       
    48 		}
       
    49 	if (!reader.Store(argv[argc-1]))
       
    50 		{
       
    51 		cerr << "Problem writing font file " << argv[argc - 1] << "\n";
       
    52 		return -1;
       
    53 		}
       
    54 	cout << argv[argc - 1] << " created\n";	
       
    55 	return 0;
       
    56 	}