diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-03 07:30:01 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-03 07:30:01 +0000 |
commit | 1dc7f490c91993a06b0de1988efece102353455f (patch) | |
tree | e991c2cac3f8a1c1cc6d2c63123222bdac0f0442 /wps/wpsbuild.pl | |
parent | 8be2a90d783e5fd0063e22b76a760a917124c758 (diff) | |
download | rockbox-1dc7f490c91993a06b0de1988efece102353455f.tar.gz rockbox-1dc7f490c91993a06b0de1988efece102353455f.zip |
Use a different remote font than the main LCD font
Works for both wps config and settings
Only change targets with LCD_REMOTE_HEIGHT <= 64 (irivers) to use
08-Rockfont
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26505 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'wps/wpsbuild.pl')
-rwxr-xr-x | wps/wpsbuild.pl | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index 81a90f3c04..57dc3de283 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl | |||
@@ -47,6 +47,7 @@ my $rsbs_w_size; | |||
47 | my $width; | 47 | my $width; |
48 | my $height; | 48 | my $height; |
49 | my $font; | 49 | my $font; |
50 | my $remotefont; | ||
50 | my $fgcolor; | 51 | my $fgcolor; |
51 | my $bgcolor; | 52 | my $bgcolor; |
52 | my $statusbar; | 53 | my $statusbar; |
@@ -160,11 +161,11 @@ sub copybackdrop | |||
160 | sub copythemefont | 161 | sub copythemefont |
161 | { | 162 | { |
162 | #copy the font specified by the theme | 163 | #copy the font specified by the theme |
164 | my $o = $_[0]; | ||
163 | 165 | ||
164 | my $o=$font; | ||
165 | $o =~ s/\.fnt/\.bdf/; | 166 | $o =~ s/\.fnt/\.bdf/; |
166 | mkdir "$rbdir/fonts"; | 167 | mkdir "$rbdir/fonts"; |
167 | my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$font\" \"$ROOT/fonts/$o\" "; | 168 | my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$_[0]\" \"$ROOT/fonts/$o\" "; |
168 | `$cmd`; | 169 | `$cmd`; |
169 | } | 170 | } |
170 | 171 | ||
@@ -288,6 +289,13 @@ MOO | |||
288 | push @out, "font: /$rbdir/fonts/$font\n"; | 289 | push @out, "font: /$rbdir/fonts/$font\n"; |
289 | } | 290 | } |
290 | } | 291 | } |
292 | if(defined($remotefont) && $has_remote) { | ||
293 | if ($remotefont eq '') { | ||
294 | push @out, "remote font: -\n"; | ||
295 | } else { | ||
296 | push @out, "remote font: /$rbdir/fonts/$remotefont\n"; | ||
297 | } | ||
298 | } | ||
291 | if($fgcolor && $main_depth > 2) { | 299 | if($fgcolor && $main_depth > 2) { |
292 | push @out, "foreground color: $fgcolor\n"; | 300 | push @out, "foreground color: $fgcolor\n"; |
293 | } | 301 | } |
@@ -405,6 +413,7 @@ while(<WPS>) { | |||
405 | undef $width; | 413 | undef $width; |
406 | undef $height; | 414 | undef $height; |
407 | undef $font; | 415 | undef $font; |
416 | undef $remotefont; | ||
408 | undef $fgcolor; | 417 | undef $fgcolor; |
409 | undef $bgcolor; | 418 | undef $bgcolor; |
410 | undef $statusbar; | 419 | undef $statusbar; |
@@ -492,7 +501,10 @@ while(<WPS>) { | |||
492 | copythemeviewericon(); | 501 | copythemeviewericon(); |
493 | } | 502 | } |
494 | if ($font) { | 503 | if ($font) { |
495 | copythemefont(); | 504 | copythemefont($font); |
505 | } | ||
506 | if ($remotefont) { | ||
507 | copythemefont($remotefont); | ||
496 | } | 508 | } |
497 | if(!$isrwps) { | 509 | if(!$isrwps) { |
498 | # We only make .cfg files for <wps> sections: | 510 | # We only make .cfg files for <wps> sections: |
@@ -554,6 +566,12 @@ while(<WPS>) { | |||
554 | elsif($l =~ /^Font\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | 566 | elsif($l =~ /^Font\.${main_width}x${main_height}x$main_depth: *(.*)/i) { |
555 | $font = $1; | 567 | $font = $1; |
556 | } | 568 | } |
569 | elsif($l =~ /^Remote Font\.${remote_width}x${remote_height}x$remote_depth: *(.*)/i) { | ||
570 | $remotefont = $1; | ||
571 | } | ||
572 | elsif($l =~ /^Remote Font: *(.*)/i) { | ||
573 | $remotefont = $1; | ||
574 | } | ||
557 | elsif($l =~ /^Foreground Color: *(.*)/i) { | 575 | elsif($l =~ /^Foreground Color: *(.*)/i) { |
558 | $fgcolor = $1; | 576 | $fgcolor = $1; |
559 | } | 577 | } |