equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 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 # |
|
16 # AddPicto.pl |
|
17 # |
|
18 # Creates pictograph data (empty characters) in BDF format |
|
19 |
|
20 use strict; |
|
21 |
|
22 if (@ARGV != 4) |
|
23 { |
|
24 print "Usage: AddPicto.pl <filename> <pixel width> <start code> <end code>"; |
|
25 exit( 0 ); |
|
26 } |
|
27 |
|
28 open (FILE, ">>$ARGV[0]") || die "Couldn't open $ARGV[0]\n"; |
|
29 |
|
30 my ($dwidth) = $ARGV[1]; |
|
31 my ($swidth) = int($dwidth * 1000 / 12 + 0.5); |
|
32 my ($code) = hex($ARGV[2]); |
|
33 my ($end) = hex($ARGV[3]); |
|
34 |
|
35 while ($code <= $end ) |
|
36 { |
|
37 my ($hexval) = sprintf("%X", $code); |
|
38 print FILE "STARTCHAR picto_$hexval\n"; |
|
39 print FILE "ENCODING $code\n"; |
|
40 print FILE "SWIDTH $swidth 0\n"; |
|
41 print FILE "DWIDTH $dwidth 0\n"; |
|
42 print FILE "BBX 0 0 0 2\n"; |
|
43 print FILE "BITMAP\n"; |
|
44 print FILE "ENDCHAR\n"; |
|
45 $code++; |
|
46 } |
|
47 |
|
48 close FILE; |
|
49 exit( 0 ); |