ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [fontloader] cached fonts have invalid tounicode values
@ 2013-06-28  0:14 Akira Kakuto
  2013-06-28 11:12 ` Philipp Gesang
  0 siblings, 1 reply; 5+ messages in thread
From: Akira Kakuto @ 2013-06-28  0:14 UTC (permalink / raw)
  To: ntg-context

Hi Philipp,

> I’ve traced it to luatex-basics-gen.lua.

luaotfload-basics-gen.lua and luaotfload-merged.lua?
Thank you very much.

Akira

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [fontloader] cached fonts have invalid tounicode values
  2013-06-28  0:14 [fontloader] cached fonts have invalid tounicode values Akira Kakuto
@ 2013-06-28 11:12 ` Philipp Gesang
  2013-06-28 11:33   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Gesang @ 2013-06-28 11:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 389 bytes --]

···<date: 2013-06-28, Friday>···<from: Akira Kakuto>···

> Hi Philipp,
> 
> >I’ve traced it to luatex-basics-gen.lua.
> 
> luaotfload-basics-gen.lua and luaotfload-merged.lua?

The latter is generated from the former, so yes. For a hot fix it
suffices to patch the merged file. Anyways, luaotfload will be
updated once Hans pushes a fix upstream.

Best,
Philipp


[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [fontloader] cached fonts have invalid tounicode values
  2013-06-28 11:12 ` Philipp Gesang
@ 2013-06-28 11:33   ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-06-28 11:33 UTC (permalink / raw)
  To: ntg-context

On 6/28/2013 1:12 PM, Philipp Gesang wrote:
> ···<date: 2013-06-28, Friday>···<from: Akira Kakuto>···
>
>> Hi Philipp,
>>
>>> I’ve traced it to luatex-basics-gen.lua.
>>
>> luaotfload-basics-gen.lua and luaotfload-merged.lua?
>
> The latter is generated from the former, so yes. For a hot fix it
> suffices to patch the merged file. Anyways, luaotfload will be
> updated once Hans pushes a fix upstream.

but be careful with that ... there will be some experimental code in 
coming betas that won't effect context but will probably make there way 
into generic some time later, when found ok

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [fontloader] cached fonts have invalid tounicode values
  2013-06-27  9:09 Philipp Gesang
@ 2013-06-27 20:08 ` Philipp Gesang
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Gesang @ 2013-06-27 20:08 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1: Type: text/plain, Size: 1073 bytes --]

···<date: 2013-06-27, Thursday>···<from: Philipp Gesang>···

> Hi Hans,
> 
> this has been reported by Dohyun Kim [1]: the generic fontloader
> (not Context) serializes some tounicode values as Lua numbers,
> not strings. When re-reading the cache file the values lose all
> leading zeros, so they are no longer well-formed UTF-16BE.
> 
>     ...
>       ["tounicode"]={
>        [2329]="E001",
>     ...
>        [2384]="0063006B",   -- <-- correct
>        [2385]=00630068,     -- <-- invalid
>        [2386]=00740074,
>        [2387]=00630074,
>        [2388]="017F0069",
>     ...
> 
> Best regards,
> Philipp
> 
> [1] https://github.com/lualatex/luaotfload/issues/102
>     (Kim’s example works with luatex-plain if you comment out the
>     ``\input luaotfload.sty`` line.)

I’ve traced it to luatex-basics-gen.lua. The cache is compiled
with the spec “{reduce = true}” which causes values to be
analyzed and “tonumber()”ed. If I unset the reduce flag, the
values turn out correct in the PDF.

Best,
Philipp



[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [fontloader] cached fonts have invalid tounicode values
@ 2013-06-27  9:09 Philipp Gesang
  2013-06-27 20:08 ` Philipp Gesang
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Gesang @ 2013-06-27  9:09 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1: Type: text/plain, Size: 818 bytes --]

Hi Hans,

this has been reported by Dohyun Kim [1]: the generic fontloader
(not Context) serializes some tounicode values as Lua numbers,
not strings. When re-reading the cache file the values lose all
leading zeros, so they are no longer well-formed UTF-16BE.

    ...
      ["tounicode"]={
       [2329]="E001",
    ...
       [2384]="0063006B",   -- <-- correct
       [2385]=00630068,     -- <-- invalid
       [2386]=00740074,
       [2387]=00630074,
       [2388]="017F0069",
    ...

Best regards,
Philipp

[1] https://github.com/lualatex/luaotfload/issues/102
    (Kim’s example works with luatex-plain if you comment out the
    ``\input luaotfload.sty`` line.)



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-28 11:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-28  0:14 [fontloader] cached fonts have invalid tounicode values Akira Kakuto
2013-06-28 11:12 ` Philipp Gesang
2013-06-28 11:33   ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2013-06-27  9:09 Philipp Gesang
2013-06-27 20:08 ` Philipp Gesang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).