On 2015-10-26, Guenter Milde wrote:
> On 2015-10-26, Scott Kostyshak wrote:
>> On Fri, Oct 23, 2015 at 07:31:49PM +0000, Guenter Milde wrote:

> With the latest 2 fixes (36b9645b5de6d463b4909 and 2aa65fdc8d2cde1ba863),
> all 4 test files compile.

>>> >> >>     Includes "FIXME"s at places where further action is required
>>> >> >>     to get the XeTeX export right but I don't know how.
>>> >> >> ...

>>> >> >> +         &&!runparams.isFullUnicode()) { // FIXME: check must be 
>>> >> >> done for useNonTeXFonts!
>>> >> >>               os << "\\inputencoding{utf8}\n"
>>> >> >>                  << setEncoding("UTF-8");

>>> >> > So to make sure I understand what you want with this FIXME is you
>>> >> > would like to do something like params().useNonTeXFonts as you do
>>> >> > in Buffer.cpp but in PDFOptions.cpp it's not clear how to access
>>> >> > that?

>>> >> It may also be that I misunderstand what is done there, but
>>> >> basically, yes: I believe that the test at these places must be for
>>> >> "useNonTeXFonts" instead of "isFullUnicode", because XeTeX/LuaTeX
>>> >> with TeX fonts behave more similar to 8-bit TeX regarding the in-
>>> >> and output encodings.

>>> > OK, what about the attached patch? Can you check that it does what you
>>> > want as far as the two FIXMEs in PDFOptions.cpp? 

...

>> Has anything changed in the last couple of days?

Today, I found out that the problem is tricky:

As the PDF-Info does not use TeX fonts, Xe/LuaTeX handling (in principle)
does not depend on the "use-nonTeXfonts" setting. However, as we use
"luainputenc" with LuaTeX and 8-bit encodings, we have to differentiate:

LuaTeX: if "luainputenc" is used (i.e. with 8-bit input encodings) 
        this is called before the hyperref setup and hence the 8-bit
        encoding is active -- "luainputenc" transformes the bytes into LICR --
        and we need the same \inputenc wrapper as with 8-bit TeX.
        
XeTeX:  does not use "inputenc", the input encoding is utf-8 
        (but we need to export LICR ("ascii") for the document parts that
        are typeset with TeX fonts).
        
        "hyperref" with XeTeX and "raw utf8" and works fine with any Unicode 
character.
        
        However, we need the 
                           << setEncoding("UTF-8");
        (without the 
                        os << "\\inputencoding{utf8}\n"
        )
        For XeTeX and non-TeX fonts.


I'l commit an updated FIXME.

> It may well be, that the FIXME in PDFOptions is not enaugh - maybe we have
> to push the content through unicodesymbols conversion, too.

This is true for "latexencoding"="ascii" with 8-bit TeX, see my other post.


Günter

Reply via email to