Skip to content
Browse files

Handle all ways to specify font size, closes #2

  • Loading branch information...
1 parent 8442c98 commit a7017a722d5cc1b7382b65635d53b939d118de6f @majutsushi committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 font-size
View
6 font-size
@@ -191,7 +191,7 @@ sub font_change_size_xft
my $new_size = 0;
foreach my $piece (@pieces) {
- if ($piece =~ /pixelsize=(\d+)/) {
+ if ($piece =~ /^(?:(?:pixel)?size=|[^=-]+-)(\d+)$/) {
$size = $1;
if ($basesize != 0) {
@@ -200,7 +200,7 @@ sub font_change_size_xft
$new_size = ($change > 0 ? ($size + 1) : ($size - 1));
}
- $piece =~ s/pixelsize=$size/pixelsize=$new_size/;
+ $piece =~ s/(=|-)$size/$1$new_size/;
}
push @resized, $piece;
}
@@ -208,7 +208,7 @@ sub font_change_size_xft
my $resized_str = join(":", @resized);
# don't make fonts too small
- if ($new_size >= 10) {
+ if ($new_size >= 6) {
return ($resized_str, $new_size);
} else {
if ($basesize == 0) {

0 comments on commit a7017a7

Please sign in to comment.
Something went wrong with that request. Please try again.