mirror of
https://github.com/sayyadirfanali/Myna.git
synced 2026-04-25 01:38:35 +02:00
improve comparison
This commit is contained in:
BIN
images/comp.png
BIN
images/comp.png
Binary file not shown.
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 108 KiB |
@@ -4,14 +4,14 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $symbols = [
|
my $symbols = [
|
||||||
{ "pos" => 400, "sym" => "->" },
|
{ "pos" => 200, "sym" => "->" },
|
||||||
{ "pos" => 600, "sym" => "=>" },
|
{ "pos" => 400, "sym" => "=>" },
|
||||||
{ "pos" => 800, "sym" => "~>" },
|
{ "pos" => 600, "sym" => "~>" },
|
||||||
{ "pos" => 1000, "sym" => "<>" },
|
{ "pos" => 800, "sym" => "<>" },
|
||||||
{ "pos" => 1200, "sym" => "=~" },
|
{ "pos" => 1000, "sym" => "=~" },
|
||||||
{ "pos" => 1400, "sym" => "<\$>" },
|
{ "pos" => 1200, "sym" => "<\$>" },
|
||||||
{ "pos" => 1600, "sym" => "<*>" },
|
{ "pos" => 1400, "sym" => "<*>" },
|
||||||
{ "pos" => 1800, "sym" => ">>=" },
|
{ "pos" => 1600, "sym" => ">>=" },
|
||||||
];
|
];
|
||||||
|
|
||||||
my $fonts = [
|
my $fonts = [
|
||||||
@@ -29,22 +29,17 @@ my $fonts = [
|
|||||||
sub f {
|
sub f {
|
||||||
my ($x, $s) = @_;
|
my ($x, $s) = @_;
|
||||||
return join(" ",
|
return join(" ",
|
||||||
"-pointsize 64",
|
"-pointsize 48",
|
||||||
"-fill white -stroke white",
|
"-fill black",
|
||||||
(map { "-font \"$_->{name}\" -annotate +$x+$_->{pos} \"$s\"" } $fonts->@*),
|
(map { "-font \"$_->{name}\" -annotate +$x+$_->{pos} \"$s\"" } $fonts->@*),
|
||||||
"-fill cyan -stroke cyan -font \"Myna\" -annotate +$x+1050 \"$s\""
|
"-fill crimson -font \"Myna\" -annotate +$x+1020 \"$s\"",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
system (join(" ",
|
system (join(" ",
|
||||||
"magick",
|
"magick",
|
||||||
"-size 2000x1200 xc:black",
|
"-size 2000x1200 xc:#fefefe",
|
||||||
"-gravity northwest",
|
"-gravity northwest",
|
||||||
"-pointsize 64 -strokewidth 1.2 -fill white -stroke white -font \"Inter-Regular\"",
|
|
||||||
join(' ', map { "-annotate +80+$_->{pos} \"@{[$_->{name} =~ s/-.*//r]}\"" } $fonts->@*),
|
|
||||||
'-fill cyan -stroke cyan -annotate +80+1050 "Myna"',
|
|
||||||
|
|
||||||
join (' ', map { f($_->{pos}, $_->{sym}) } $symbols->@*),
|
join (' ', map { f($_->{pos}, $_->{sym}) } $symbols->@*),
|
||||||
|
|
||||||
$ARGV[0]
|
$ARGV[0]
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ my $text = [
|
|||||||
|
|
||||||
system(join(' ',
|
system(join(' ',
|
||||||
"magick",
|
"magick",
|
||||||
"-size 2000x2200 xc:\"#1A1A1A\" -gravity north -pointsize 128 -font Myna -strokewidth 1.2",
|
"-size 2000x2200 xc:\"#1a1a1a\" -gravity north -pointsize 128 -font Myna -strokewidth 1.2",
|
||||||
(map { "-fill $_->{col} -stroke $_->{col} -annotate +0+$_->{pos} \"$_->{string}\"" } $text->@*),
|
(map { "-fill $_->{col} -stroke $_->{col} -annotate +0+$_->{pos} \"$_->{string}\"" } $text->@*),
|
||||||
$ARGV[0]
|
$ARGV[0]
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user