On 2016-01-13, Kornel Benko wrote:
> Am 13. Januar 2016 um 21:50:15, schrieb Guenter Milde <mi...@users.sf.net>

Dear Kornel,

>> >> The following tests FAILED:
>> >>   1945 - EXAMPLES_export/examples/aas_sample_pdf4_systemF (Failed)
>> >> Errors while running CTest

>> >> However, manually changing the fonts to "non-TeX" and running export with
>> >> XeTeX worked without error!
...
>> >> This explains a bit: The "hidden" font replacements lead to failure!

> If it is not found, then maybe your TeX installation is broken?

As FreeMono is a system font, this may have other reasons as well.

>> Three options:

>> a) mark it as unreliable,
>> b) don't use FreeMono
>> c) ignore that the test fails at my site
...
>> I am fine with b) and c).

> c then.

OK.

>> > Where did you find the file aas_sample_pdf4_systemF.tex?

>> I did not find it, it is mentioned in the error log

> OK, but you claimed that the font replacement is guilty.

Yes, because

* opening "examples/aas_sample.lyx" in LyX 2.2git
* clicking Document>Settings>Fonts>use non-TeX fonts
* compiling with XeTeX

(this is what I call "compiling by hand") works.

-> there is no need for different system fonts with this document.


>> Testing/Temporary/LastTest.log (see below).

> This is not always a proof, sometimes tests running parallel with other
> tests fail. Rerunning the test alone may pass. Do you use 'ctest -j' ?

I only tested one case: EXAMPLES_export/examples/aas_sample_pdf4_systemF
below is the complete log.

Günter


>> Start testing: Jan 13 22:42 CET
>> ----------------------------------------------------------
>> 1960/4957 Testing: EXAMPLES_export/examples/aas_sample_pdf4_systemF
>> 1960/4957 Test: EXAMPLES_export/examples/aas_sample_pdf4_systemF
>> Command: "/usr/bin/cmake" "-DLYX_ROOT=/usr/local/src/lyx/lib/examples" 
>> "-DLYX_TESTS_USERDIR=/usr/local/src/lyxtest/Testing/.lyx" 
>> "-Dlyx=/usr/local/src/lyxtest/bin/lyx2.2" 
>> "-DWORKDIR=/usr/local/src/lyxtest/autotests/out-home" "-Dformat=pdf4" 
>> "-Dfonttype=systemF" "-Dextension=pdf4" "-Dfile=aas_sample" "-Dinverted=0" 
>> "-DTOP_SRC_DIR=/usr/local/src/lyx" "-DPERL_EXECUTABLE=/usr/bin/perl" "-P" 
>> "/usr/local/src/lyx/development/autotests/export.cmake"
>> Directory: /usr/local/src/lyxtest/autotests/out-home
>> "EXAMPLES_export/examples/aas_sample_pdf4_systemF" start time: Jan 13 22:42 
>> CET
>> Output:
>> ----------------------------------------------------------
>> -- using fonttype = systemF
>> -- LYX_TESTS_USERDIR = /usr/local/src/lyxtest/Testing/.lyx
>> -- Converting with perl 
>> /usr/local/src/lyx/development/autotests/useSystemFonts.pl
>> -- Using source "/usr/local/src/lyx/lib/examples/aas_sample.lyx"
>> -- Using dest 
>> "/usr/local/src/lyxtest/autotests/out-home/AbC_a6_yuy/aas_sample_pdf4_systemF.lyx"
>> res1 = 1 for "/usr/local/src/lyx/lib/examples/aas_sample.lyx" to be copied 
>> to 
>> /usr/local/src/lyxtest/autotests/out-home/AbC_a6_yuy/aas_sample_pdf4_systemF.lyx
>> -- Executing /usr/local/src/lyxtest/bin/lyx2.2 -userdir 
>> "/usr/local/src/lyxtest/Testing/.lyx" -E pdf4 aas_sample_systemF.pdf4 
>> "/usr/local/src/lyxtest/autotests/out-home/AbC_a6_yuy/aas_sample_pdf4_systemF.lyx"
>> This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) 
>> (preloaded format=xelatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> (./aas_sample_pdf4_systemF.tex
>> LaTeX2e <2015/10/01> patch level 1
>> Babel <3.9m> and hyphenation patterns for 53 languages loaded.

>> kpathsea:make_tex: Invalid fontname `FreeMono:', contains ':'
>> support/Systemcall.cpp (291): Systemcall: 'xelatex  
>> "aas_sample_pdf4_systemF.tex"' finished with exit code 1
>> This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) 
>> (preloaded format=xelatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> (./aas_sample_pdf4_systemF.tex
>> LaTeX2e <2015/10/01> patch level 1
>> Babel <3.9m> and hyphenation patterns for 53 languages loaded.

>> kpathsea:make_tex: Invalid fontname `FreeMono:', contains ':'

> I can see the error. Where did the ':' came from?
> To be sure, we can try to obtain the converted lyx file. 

> For this you have to patch the file export.cmake:150
> Comment this line, e.g. change to
>       #execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory 
> "${TempDir}")

> Now run the test
>       ctest -R EXAMPLES_export/examples/aas_sample_pdf4_systemF

> and search for the dir AbC\*
>       find . -name AbC\*
> Inside this dir is a file named aas_sample_pdf4_systemF.lyx.

> Please check this file for wrong font selection.

Opening this file, I see under Document>Settings>Fonts:

  Schreibmaschine  FreeMono (nicht installiert)

Compiling I see in the x-terminal emulator 4 times the output
  
  kpathsea:make_tex: Invalid fontname `FreeMono:', contains ':'
  support/Systemcall.cpp (291): Systemcall: 'xelatex  
"aas_sample_pdf4_systemF.tex"' finished with exit code 1
  This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) 
(preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode
  (./aas_sample_pdf4_systemF.tex
  LaTeX2e <2015/10/01> patch level 1
  Babel <3.9m> and hyphenation patterns for 53 languages loaded.

followed by 

  kpathsea:make_tex: Invalid fontname `FreeMono:', contains ':'
  support/Systemcall.cpp (291): Systemcall: 'xelatex  
"aas_sample_pdf4_systemF.tex"' finished with exit code 1

and in the pop-up error box the explanation:

  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  !
  ! fontspec error: "font-not-found"
  ! 
  ! The font "FreeMono" cannot be found.
  ! 
  ! See the fontspec documentation for further information.
  ! 
  ! For immediate help type H <return>.
  !...............................................  

It seems like 

* LyX tries 5 runs of compilation (this would explain the long
  time it takes until the error window pops up)
  
* the ":" is added by XeTeX or fontspec during the searchf for a
  non-installed font.
  
* the ctest log reports console output but ignores and deletes LaTeX logs.


There is room for improvement on many sides, but for now
my point is that the system font replacement is no longer necessary:

* It was a workaround to get working examples with 2.1.

* It has the drawback that it may become very complicated to understand
  and reproduce what is going on in case there is a failure.

* With 2.2 you can store alternative system fonts in the source, so the
  workaround is no longer required.
  
  In the single case of "wrong" replacements (Hebrew: sans serif font for
  serif and monospaced, because there is no working serif and monospaced
  font), I propose to mark the example and manual docs as "inverted"
  and add a special purpose document with working fonts.


Günter

Reply via email to