# 2.) While copying,
# 2a.) searches for relative references to files and
# replaces them with absolute ones
-# 2b.) In order to be able to compile with luatex or xetex
-# changes default fonts to use non-tex-fonts instead
+# 2b.) Changes default fonts to use non-tex-fonts
+# 2c.) Changes the non-tex fonts setting if it is "default" (see below).
#
# Syntax: perl useSystemFonts.pl sourceFile destFile format
# Each param represents a path to a file
$font{sans} = "FreeFarsi";
$font{typewriter} = "FreeFarsi Monospace";
}
- elsif ($lang eq "zh_CN") {
- $font{roman} = "WenQuanYi Micro Hei";
- $font{sans} = "WenQuanYi Micro Hei";
- $font{typewriter} = "WenQuanYi Micro Hei";
- }
- elsif ($lang eq "ko" ) {
- $font{roman} = "NanumGothic"; # NanumMyeongjo, NanumGothic Eco, NanumGothicCoding
- $font{sans} = "NanumGothic";
- $font{typewriter} = "NanumGothic";
- }
+ # elsif ($lang eq "ko" ) {
+ # $font{roman} = "NanumGothic"; # NanumMyeongjo, NanumGothic Eco, NanumGothicCoding
+ # $font{sans} = "NanumGothic";
+ # $font{typewriter} = "NanumGothic";
+ # }
elsif ($lang eq "ar" ) {
# available in 'fonts-sil-scheherazade' package
$font{roman} = "Scheherazade";
initLyxStack(\%font, $fontT, $inputEncoding);
+ my $fi_line_no = 0;
+ my @path_errors = ();
while (my $l = <FI>) {
+ $fi_line_no += 1;
$l =~ s/[\n\r]+$//;
#chomp($l);
my $rStatus = checkLyxLine($l);
$res += $res1;
}
}
+ else {
+ if (! -e "$f") {
+ # Non relative (e.g. with absolute path) file should exist
+ if ($rStatus->{"filetype"} eq "interpret") {
+ # filetype::interpret should be interpreted by lyx or latex and therefore emit error
+ # We prinnt a warning instead
+ print "WARNING: Interpreted file \"$f\" not found, at \"$source:$fi_line_no\"\n";
+ }
+ elsif ($rStatus->{"filetype"} eq "prefix_only") {
+ # filetype::prefix_only should be interpreted by latex
+ print "WARNING: Prefixed file \"$f\" not found, at \"$source:$fi_line_no\"\n";
+ }
+ else {
+ # Collect the path-error-messages
+ push(@path_errors, "File \"$f(" . $rStatus->{"filetype"} . ")\" not found, at \"$source:$fi_line_no\"");
+ }
+ }
+ }
}
if ($foundrelative) {
$rF->[$fidx] = join($separator, @{$filelist});
}
close(FI);
close(FO);
+ if (@path_errors > 0) {
+ for my $entry (@path_errors) {
+ print "ERROR: $entry\n";
+ }
+ diestack("Aborted because of path errors in \"$source\"");
+ }
closeLyxStack();
return($res);