X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=development%2Fautotests%2FuseSystemFonts.pl;h=01b8b05dd109156ae335ca984df081622c4f529e;hb=c4ae71ceb2cfbc3e8fb52cfbc8396a6309af5dbc;hp=0c48880746354fa404a674e66667f88fa28689b4;hpb=3b41ec6a3f3d39c635ae2de7526f59f44ad40266;p=lyx.git diff --git a/development/autotests/useSystemFonts.pl b/development/autotests/useSystemFonts.pl index 0c48880746..01b8b05dd1 100644 --- a/development/autotests/useSystemFonts.pl +++ b/development/autotests/useSystemFonts.pl @@ -75,11 +75,13 @@ $dest = File::Spec->rel2abs($dest); my %font = (); my $lang = "main"; -if ($source =~ /\/([a-z][a-z](_[A-Z][A-Z])?)\//) { +if ($source =~ /\/([a-z][a-z](_[A-Z][A-Z])?)[\/_]/) { $lang = $1; } + +my $inputEncoding = undef; if ($fontT eq "systemF") { - if ($lang =~ /^(ru|uk)$/) { + if ($lang =~ /^(ru|uk|sk)$/) { $font{roman} = "DejaVu Serif"; $font{sans} = "DejaVu Sans"; $font{typewriter} = "DejaVu Sans Mono"; @@ -119,6 +121,20 @@ if ($fontT eq "systemF") { } else { # use tex font here + if ($format =~ /^(pdf4)$/) { # xelatex + # set input encoding to 'ascii' always + $inputEncoding = { + "search" => '.*', # this will be substituted from '\inputencoding'-line + "out" => "ascii", + }; + } + elsif ($format =~ /^(dvi3|pdf5)$/) { # (dvi)?lualatex + # when to set input encoding to 'ascii'? + #$inputEncoding = { + # "search" => 'auto|default', # this will be substituted from '\inputencoding'-line + # "out" => "ascii", + #}; + } } my $sourcedir = dirname($source); @@ -175,7 +191,7 @@ sub interpretedCopy($$$$) diestack("could not read \"$source\"") if (!open(FI, $source)); diestack("could not write \"$dest\"") if (! open(FO, '>', $dest)); - initLyxStack(\%font, $fontT); + initLyxStack(\%font, $fontT, $inputEncoding); while (my $l = ) { chomp($l);