luatex font path problem

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

luatex font path problem

Arthur Tu
After lualatex command, file
"~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was generated.

Entry like this for example
   {
    ["familyname"]="SimSun",
    ["filename"]={ "c:/windows/fonts/simsun.ttc", 0 },
    ["fontname"]="SimSun",
    ["fullname"]="SimSun",
    ["names"]={
     ["family"]="SimSun",
     ["fullname"]="SimSun",
     ["psname"]="SimSun",
     ["subfamily"]="Regular",
    },
    ["size"]={},
    ["slant"]=0,
    ["weight"]=400,
    ["width"]=5,
   },

when I used \setmainfont{SimSun}, error occured that SimSun font not found.
When i used \setmainjfont[Path=/cygdrive/c/windows/fonts/]{simsun.ttc}
and specify the path in *unix-style, it works.

So i think this is another mixed path style problem in cygwin.
Even though the fonts in system dir are listed in otfl-names.lua, they
can't be accessed because their pathes are in windows-style.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
On 4/28/2013 12:56 PM, Arthur Tu wrote:

> After lualatex command, file
> "~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was generated.
>
> Entry like this for example
>    {
>     ["familyname"]="SimSun",
>     ["filename"]={ "c:/windows/fonts/simsun.ttc", 0 },
>     ["fontname"]="SimSun",
>     ["fullname"]="SimSun",
>     ["names"]={
>      ["family"]="SimSun",
>      ["fullname"]="SimSun",
>      ["psname"]="SimSun",
>      ["subfamily"]="Regular",
>     },
>     ["size"]={},
>     ["slant"]=0,
>     ["weight"]=400,
>     ["width"]=5,
>    },
>
> when I used \setmainfont{SimSun}, error occured that SimSun font not found.
> When i used \setmainjfont[Path=/cygdrive/c/windows/fonts/]{simsun.ttc}
> and specify the path in *unix-style, it works.
>
> So i think this is another mixed path style problem in cygwin.
> Even though the fonts in system dir are listed in otfl-names.lua, they
> can't be accessed because their pathes are in windows-style.

I'm on vacation right now, but I'll look into this in mid-May when I return.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu
On 4/30/2013 12:47 AM, Ken Brown wrote:

> On 4/28/2013 12:56 PM, Arthur Tu wrote:
>> After lualatex command, file
>> "~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was
>> generated.
>>
>> Entry like this for example
>>    {
>>     ["familyname"]="SimSun",
>>     ["filename"]={ "c:/windows/fonts/simsun.ttc", 0 },
>>     ["fontname"]="SimSun",
>>     ["fullname"]="SimSun",
>>     ["names"]={
>>      ["family"]="SimSun",
>>      ["fullname"]="SimSun",
>>      ["psname"]="SimSun",
>>      ["subfamily"]="Regular",
>>     },
>>     ["size"]={},
>>     ["slant"]=0,
>>     ["weight"]=400,
>>     ["width"]=5,
>>    },
>>
>> when I used \setmainfont{SimSun}, error occured that SimSun font not
>> found.
>> When i used \setmainjfont[Path=/cygdrive/c/windows/fonts/]{simsun.ttc}
A typo here.
\setmainjfont Should be \setmainfont. \setmainjfont only works when
luatex-ja package is available.

>> and specify the path in *unix-style, it works.
>>
>> So i think this is another mixed path style problem in cygwin.
>> Even though the fonts in system dir are listed in otfl-names.lua, they
>> can't be accessed because their pathes are in windows-style.
>
> I'm on vacation right now, but I'll look into this in mid-May when I
> return.
>
> Ken
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Yaakov (Cygwin/X)
In reply to this post by Arthur Tu
On 2013-04-28 11:56, Arthur Tu wrote:
> After lualatex command, file
> "~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was generated.
[snip]

Could you provide a small TeX sample with which this can be reproduced?


Yaakov



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu

> Could you provide a small TeX sample with which this can be reproduced?
Yes, of course.

``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
\documentclass{article}
\usepackage{fontspec}

%% When I specify the path in *unix-style, it works fine.
\setmainfont[Path=/cygdrive/c/windows/fonts/]{arial.ttf}

%% % This was supposed to work.
%% \setmainfont{Arial}

\begin{document}
\section{test}
\end{document}
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

I tried to keep the sample small in case you don't have luatex-ja or
chinese fonts installed. Anyway, this can be reproduced with any font
used under C:/windows/fonts/.

Here is the entry of arial in otfl-names.lua
   {
    ["familyname"]="Arial",
    ["filename"]={ "c:/windows/fonts/arial.ttf", false },
    ["fontname"]="ArialMT",
    ["fullname"]="Arial",
    ["names"]={
     ["family"]="Arial",
     ["fullname"]="Arial",
     ["psname"]="ArialMT",
     ["subfamily"]="Regular",
    },

I use auctex to edit tex file. It provide luatex engine to compile file.

lualatex --jobname=test  -interaction=nonstopmode "\input" test.tex
  is used by auctex.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
In reply to this post by Arthur Tu
On 4/29/2013 10:50 PM, Arthur Tu wrote:

> On 4/30/2013 12:47 AM, Ken Brown wrote:
>> On 4/28/2013 12:56 PM, Arthur Tu wrote:
>>> After lualatex command, file
>>> "~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was
>>> generated.
>>>
>>> Entry like this for example
>>>    {
>>>     ["familyname"]="SimSun",
>>>     ["filename"]={ "c:/windows/fonts/simsun.ttc", 0 },
>>>     ["fontname"]="SimSun",
>>>     ["fullname"]="SimSun",
>>>     ["names"]={
>>>      ["family"]="SimSun",
>>>      ["fullname"]="SimSun",
>>>      ["psname"]="SimSun",
>>>      ["subfamily"]="Regular",
>>>     },
>>>     ["size"]={},
>>>     ["slant"]=0,
>>>     ["weight"]=400,
>>>     ["width"]=5,
>>>    },
>>>
>>> when I used \setmainfont{SimSun}, error occured that SimSun font not
>>> found.
>>> When i used \setmainjfont[Path=/cygdrive/c/windows/fonts/]{simsun.ttc}
> A typo here.
> \setmainjfont Should be \setmainfont. \setmainjfont only works when
> luatex-ja package is available.
>>> and specify the path in *unix-style, it works.
>>>
>>> So i think this is another mixed path style problem in cygwin.
>>> Even though the fonts in system dir are listed in otfl-names.lua, they
>>> can't be accessed because their pathes are in windows-style.
>>
>> I'm on vacation right now, but I'll look into this in mid-May when I
>> return.
I'm still on vacation but had a chance to look at this.  The problem is
the Cygwin-specific code in
/usr/share/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua.orig
otfl-font-nms.lua.  If you remove that code (see the attached patch) and
regenerate ~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua, I
think the problem will be solved.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

luaotfload.patch (867 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
On 5/7/2013 5:52 PM, Ken Brown wrote:

> On 4/29/2013 10:50 PM, Arthur Tu wrote:
>> On 4/30/2013 12:47 AM, Ken Brown wrote:
>>> On 4/28/2013 12:56 PM, Arthur Tu wrote:
>>>> After lualatex command, file
>>>> "~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua" was
>>>> generated.
>>>>
>>>> Entry like this for example
>>>>    {
>>>>     ["familyname"]="SimSun",
>>>>     ["filename"]={ "c:/windows/fonts/simsun.ttc", 0 },
>>>>     ["fontname"]="SimSun",
>>>>     ["fullname"]="SimSun",
>>>>     ["names"]={
>>>>      ["family"]="SimSun",
>>>>      ["fullname"]="SimSun",
>>>>      ["psname"]="SimSun",
>>>>      ["subfamily"]="Regular",
>>>>     },
>>>>     ["size"]={},
>>>>     ["slant"]=0,
>>>>     ["weight"]=400,
>>>>     ["width"]=5,
>>>>    },
>>>>
>>>> when I used \setmainfont{SimSun}, error occured that SimSun font not
>>>> found.
>>>> When i used \setmainjfont[Path=/cygdrive/c/windows/fonts/]{simsun.ttc}
>> A typo here.
>> \setmainjfont Should be \setmainfont. \setmainjfont only works when
>> luatex-ja package is available.
>>>> and specify the path in *unix-style, it works.
>>>>
>>>> So i think this is another mixed path style problem in cygwin.
>>>> Even though the fonts in system dir are listed in otfl-names.lua, they
>>>> can't be accessed because their pathes are in windows-style.
>>>
>>> I'm on vacation right now, but I'll look into this in mid-May when I
>>> return.
>
> I'm still on vacation but had a chance to look at this.  The problem is
> the Cygwin-specific code in
> /usr/share/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua.orig
> otfl-font-nms.lua.  If you remove that code (see the attached patch) and
> regenerate ~/.cache/texmf/luatex-cache/generic/names/otfl-names.lua, I
> think the problem will be solved.

Arthur,

I'd like to send the patch upstream.  Before I do that, could you
confirm that it solves your problem?  I hope you weren't thrown off by
the copy/paste error I made; the file to be patched is

   /usr/share/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu
I have confirmed that bug was fixed, and reported that to the list earlier.

Thanks for the patch!

> Arthur,
>
> I'd like to send the patch upstream.  Before I do that, could you
> confirm that it solves your problem?  I hope you weren't thrown off by
> the copy/paste error I made; the file to be patched is
>
>   /usr/share/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua
>
> Ken
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu
In reply to this post by Ken Brown-6
Double checked.

After I reverted zlib library to older version, lualatex worked well.

On 5/21/2013 5:25 AM, Ken Brown wrote:

> Arthur,
>
> I'd like to send the patch upstream.  Before I do that, could you
> confirm that it solves your problem?  I hope you weren't thrown off by
> the copy/paste error I made; the file to be patched is
>
>   /usr/share/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua
>
> Ken
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
In reply to this post by Arthur Tu
On 5/22/2013 10:04 PM, Arthur Tu wrote:
> I have confirmed that bug was fixed, and reported that to the list earlier.

I never saw that report, and I can't find it in the list archives.  Did
it say something about a zlib problem?  I'm confused by your most recent
message in which you say you had to revert zlib to an earlier version.
What's that about?

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu
Sorry.

I did send a confirm message to the list on 5.8 and my thunderbird
cached that message. I don't understand why it's not in the list.

The latest version of zlib in the "current" label, is 1.2.8.1. However,
lualatex used some component compiled with zlib ver1.2.7.1, so I have to
reverted zlib to that version.


On 5/23/2013 11:10 PM, Ken Brown wrote:

> On 5/22/2013 10:04 PM, Arthur Tu wrote:
>> I have confirmed that bug was fixed, and reported that to the list
>> earlier.
>
> I never saw that report, and I can't find it in the list archives.  
> Did it say something about a zlib problem?  I'm confused by your most
> recent message in which you say you had to revert zlib to an earlier
> version. What's that about?
>
> Ken
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
On 5/23/2013 2:01 PM, Arthur Tu wrote:
> Sorry.
>
> I did send a confirm message to the list on 5.8 and my thunderbird
> cached that message. I don't understand why it's not in the list.
>
> The latest version of zlib in the "current" label, is 1.2.8.1. However,
> lualatex used some component compiled with zlib ver1.2.7.1, so I have to
> reverted zlib to that version.

That's annoying.  It turns out that luatex checks the zlib version and
aborts if it's not the same version with which luatex was compiled.  A
google search turns up many complaints about this.  So I either have to
rebuild the TeX Live binaries every time zlib is updated, or else users
have to downgrade zlib, as you did.

I think I won't bother rebuilding the binaries right now, since TeX Live
2013 is probably going to be released within a month or so anyway.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Arthur Tu
Is the check of zlib version essential?

I googled a fix that remove zlib version in gentoo.

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-tex/luatex/files/remove-zlib-version-check.patch?view=diff&r1=text&tr1=1.1&r2=text&tr2=1.1&diff_format=s

However, according to the zlib changelog(http://zlib.net/ChangeLog.txt),
the release with a  major version change, such as 1.2.7->1.2.8, was not
so often. So I am fine with downgrading zlib manually, considering the
low frequency.

On 5/24/2013 3:52 AM, Ken Brown wrote:

> That's annoying.  It turns out that luatex checks the zlib version and
> aborts if it's not the same version with which luatex was compiled.  A
> google search turns up many complaints about this. So I either have to
> rebuild the TeX Live binaries every time zlib is updated, or else
> users have to downgrade zlib, as you did.
>
> I think I won't bother rebuilding the binaries right now, since TeX
> Live 2013 is probably going to be released within a month or so anyway.
>
> Ken
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
On 5/24/2013 12:23 AM, Arthur Tu wrote:

> Is the check of zlib version essential?
>
> I googled a fix that remove zlib version in gentoo.
>
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-tex/luatex/files/remove-zlib-version-check.patch?view=diff&r1=text&tr1=1.1&r2=text&tr2=1.1&diff_format=s
>
>
> However, according to the zlib changelog(http://zlib.net/ChangeLog.txt),
> the release with a  major version change, such as 1.2.7->1.2.8, was not
> so often. So I am fine with downgrading zlib manually, considering the
> low frequency.

I'm not comfortable removing the version test, since I don't know the
reason for it.  As you say, the low frequency of zlib updates makes this
a minor issue.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Yaakov (Cygwin/X)
On 2013-05-24 07:33, Ken Brown wrote:
> I'm not comfortable removing the version test, since I don't know the
> reason for it.  As you say, the low frequency of zlib updates makes this
> a minor issue.

If you were to rebuild texlive immediately, I would agree, but as you
aren't planning to, right now it is a major issue: users should not have
to choose between the important bugfixes (not to mention the new API) in
1.2.8 and a properly functioning luatex.

I agree with the conclusion in the Gentoo bug entry: the version check
is completely superfluous and should be removed, so that this does not
continue to be an issue in the future.


Yaakov


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Ken Brown-6
On 5/24/2013 5:55 PM, Yaakov (Cygwin/X) wrote:
> On 2013-05-24 07:33, Ken Brown wrote:
>> I'm not comfortable removing the version test, since I don't know the
>> reason for it.  As you say, the low frequency of zlib updates makes this
>> a minor issue.
>
> If you were to rebuild texlive immediately, I would agree, but as you
> aren't planning to, right now it is a major issue: users should not have
> to choose between the important bugfixes (not to mention the new API) in
> 1.2.8 and a properly functioning luatex.
 >
> I agree with the conclusion in the Gentoo bug entry: the version check
> is completely superfluous and should be removed, so that this does not
> continue to be an issue in the future.

Having now read through the bug entry, as well as the corresponding
thread on the dev-luatex mailing list, I agree.  So I'll rebuild texlive
within the next few days and remove the version check.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: luatex font path problem

Yaakov (Cygwin/X)
On 2013-05-24 17:41, Ken Brown wrote:
> Having now read through the bug entry, as well as the corresponding
> thread on the dev-luatex mailing list, I agree.  So I'll rebuild texlive
> within the next few days and remove the version check.

Thanks.  When you do so, please be sure to use the latest poppler
release; IIRC texlive is the only package still depending on the
obsolete libpoppler26.  (The API between 0.20.2 and 0.20.5 is fully
compatible, but there was an ABI change in one function.)


Yaakov



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple