summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-mplus-patch.pl13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/gen-mplus-patch.pl b/scripts/gen-mplus-patch.pl
index 33e452a..43c59d3 100755
--- a/scripts/gen-mplus-patch.pl
+++ b/scripts/gen-mplus-patch.pl
@@ -11,12 +11,12 @@ use Text::Diff;
my @FONTS = (
# face weight w h
+ [qw(1m regular 8 12)],
[qw(1m regular 10 14)],
[qw(1m regular 12 17)],
[qw(1m regular 16 22)],
[qw(1m regular 24 34)],
[qw(1m regular 32 44)],
- [qw(1m regular 8 12)],
);
my $PATCH = 'patches/01_add-mplus-fonts.patch';
@@ -211,7 +211,7 @@ sub patch_fonts_c
sub conv_fonts
{
my ($mplus_dir, $bdf2fbcon) = @_;
- my $patch;
+ my %patch;
my $face;
my $weight;
my $width;
@@ -219,16 +219,17 @@ sub conv_fonts
my $font_name;
my $new;
- $patch = '';
+ %patch = ();
foreach my $font (@FONTS) { ($face, $weight, $width, $height) = @$font;
$font_name = "mplus-$face-$weight";
$new = `otf2bdf -p $width -r 72 $mplus_dir/$font_name.ttf | \\
$bdf2fbcon -o - -n $font_name -p 2 -`;
- $patch .= make_patch("lib/fonts/font_mplus_${face}_${weight}_" .
- "${width}x${height}.c", '', $new);
+ $font_name .= "-${width}x${height}";
+ $patch{$font_name} = make_patch("lib/fonts/font_mplus_${face}" .
+ "_${weight}_${width}x${height}.c", '', $new);
}
- return $patch;
+ return join('', @patch{sort(keys(%patch))});
}
sub main