Re: [XeTeX] CID-keyed font support?

2014-08-01 Thread Akira Kakuto
Hi Khaled, I have found the location where the crash occurs: --- type0.c.origMon Jul 28 19:38:13 2014 +++ type0.cFri Aug 01 09:06:25 2014 @@ -132,7 +132,7 @@ if (font-descriptor) ERROR(%s: FontDescriptor unexpected for Type0 font., TYPE0FONT_DEBUG_STR); if

Re: [XeTeX] CID-keyed font support?

2014-07-31 Thread Akira Kakuto
Hi Khaled, Jiang, A japenese user reported that the new dvipdfmx crashed in the following example: % % sample.tex % (dvipdfmx r34778 crashes) % (dvipdfmx r34711 works fine) % % platex sample % dvipdfmx sample % \documentclass{tarticle} \usepackage{otf} \begin{document} This is a test. \bou{This

Re: [XeTeX] CID-keyed font support?

2014-07-31 Thread Akira Kakuto
Hi Khaled, Jiang, I cannot find the location where the crash occurs. If I remove pdf_close_fonts (); in pdf_close_document (void) in pdfdoc.c, the crash disappears, of course the resulting pdf is bad. Thus I believe pdf_close_fonts() in pdffont.c must be the reason of the crash on Windows.

Re: [XeTeX] CID-keyed font support?

2014-07-31 Thread Khaled Hosny
On Fri, Aug 01, 2014 at 08:06:36AM +0900, Akira Kakuto wrote: Hi Khaled, Jiang, A japenese user reported that the new dvipdfmx crashed in the following example: % % sample.tex % (dvipdfmx r34778 crashes) % (dvipdfmx r34711 works fine) % % platex sample % dvipdfmx sample %

Re: [XeTeX] CID-keyed font support?

2014-07-31 Thread Akira Kakuto
Hi Khaled, Jiang, I have found the location where the crash occurs: I was completely wrong. Actually, the crash on Windows occurs at the following: --- type0.c.origMon Jul 28 19:38:13 2014 +++ type0.cFri Aug 01 10:18:35 2014 @@ -133,8 +133,11 @@ ERROR(%s: FontDescriptor

Re: [XeTeX] CID-keyed font support?

2014-07-31 Thread Akira Kakuto
Hi Khaled, Jiang, I can not reproduce the crash here, so I'll leave it to Jiang to comment. After some tests, I found the following: I've found the reason and fixed in r34790. The changed line is: --- type0.c.origMon Jul 28 19:38:13 2014 +++ type0.c Fri Aug 01 11:59:44 2014 @@

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Jiang Jiang
On Mon, Jul 28, 2014 at 3:52 AM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Hi Khaled, Let hope we have enough time before the next release to make sure it is :) xdvipdfmx r34745 (after applying the patch by Jiang) sometimes crashes at --- cff.c.origMon Jul 28 08:50:32 2014 +++

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Jiang Jiang
Hi Akira, On Mon, Jul 28, 2014 at 8:10 AM, Jiang Jiang gzjj...@gmail.com wrote: Thank you Akira, I can reproduce this, will take a look. https://gist.github.com/jjgod/cf39032b839bb3542107 should fix the crashes for you. - Jiang --

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Akira Kakuto
Hi Khaled, This is a development tree after all, so bugs are to be expected. Lets debug those issues first then decide what we want to do. OK, agreed. Thank you very much. Akira -- Subscriptions, Archive, and List information, etc.:

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Akira Kakuto
Hi Khaled, Jiang, In r34750, there are no crashes, and SourceHanSans... work, thanks Jiang. Graphics in R-to-L mode is OK, thanks Khaled. I attach a sample.tex, for which there are many strange warnings, and I cannot paste some lines of text in an editor, that is, incorrect toUnicode. If I

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Khaled Hosny
On Mon, Jul 28, 2014 at 05:45:38PM +0900, Akira Kakuto wrote: Hi Khaled, This is a development tree after all, so bugs are to be expected. Lets debug those issues first then decide what we want to do. OK, agreed. Thank you very much. The /rsrc warning seems harmless, but I'm still

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Jiang Jiang
On Mon, Jul 28, 2014 at 6:28 PM, Khaled Hosny khaledho...@eglug.org wrote: On Mon, Jul 28, 2014 at 05:45:38PM +0900, Akira Kakuto wrote: Hi Khaled, This is a development tree after all, so bugs are to be expected. Lets debug those issues first then decide what we want to do. OK, agreed.

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Khaled Hosny
On Mon, Jul 28, 2014 at 08:47:44PM +0200, Jiang Jiang wrote: On Mon, Jul 28, 2014 at 6:28 PM, Khaled Hosny khaledho...@eglug.org wrote: On Mon, Jul 28, 2014 at 05:45:38PM +0900, Akira Kakuto wrote: Hi Khaled, This is a development tree after all, so bugs are to be expected. Lets debug

Re: [XeTeX] CID-keyed font support?

2014-07-28 Thread Akira Kakuto
Hi Khaled, Jiang, I think r34760 works fine. Thanks very much for your work. Akira -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex

Re: [XeTeX] CID-keyed font support?

2014-07-27 Thread Akira Kakuto
Hi Khaled, Let hope we have enough time before the next release to make sure it is :) xdvipdfmx r34745 (after applying the patch by Jiang) sometimes crashes at --- cff.c.origMon Jul 28 08:50:32 2014 +++ cff.cMon Jul 28 09:57:29 2014 @@ -1172,12 +1172,12 @@ break; case 2:

Re: [XeTeX] CID-keyed font support?

2014-07-26 Thread Jiang Jiang
On Thu, Jul 24, 2014 at 8:28 PM, Khaled Hosny khaledho...@eglug.org wrote: On Thu, Jul 24, 2014 at 07:18:10PM +0200, Jiang Jiang wrote: On Thu, Jul 24, 2014 at 6:27 PM, Khaled Hosny khaledho...@eglug.org wrote: On Thu, Jul 24, 2014 at 09:01:32AM +0200, Jiang Jiang wrote: Hi, On Thu, Jul

Re: [XeTeX] CID-keyed font support?

2014-07-26 Thread Jiang Jiang
Since the old patches no longer apply, I updated https://gist.github.com/jjgod/c1194a9b371848aaa746 with first patch rewritten. As you all can see, it is possible to do it in legacy dvipdfm-x code, just more tedious, I'm not sure what benefit that gives. Then again, I don't care that much as long

Re: [XeTeX] CID-keyed font support?

2014-07-25 Thread Ulrike Fischer
Am Thu, 24 Jul 2014 20:31:23 +0200 schrieb Khaled Hosny: Did you saw the discussion on the Texlive list regarding the problems with loading otf-fonts through map-file entries with xdvipdfmx? Yes, that is the issue I'm tackling. Good ;-) -- Ulrike Fischer

Re: [XeTeX] CID-keyed font support?

2014-07-25 Thread Akira Kakuto
Did you saw the discussion on the Texlive list regarding the problems with loading otf-fonts through map-file entries with xdvipdfmx? Yes, that is the issue I'm tackling. Good ;-) I think Khaled has fixed the issue (r34722). It seems that he is temporarily disabling the support of CID-keyed

Re: [XeTeX] CID-keyed font support?

2014-07-24 Thread Khaled Hosny
On Thu, Jul 24, 2014 at 09:01:32AM +0200, Jiang Jiang wrote: Hi, On Thu, Jul 24, 2014 at 8:07 AM, Peter Breitenlohner p...@mppmu.mpg.de wrote: On Wed, 23 Jul 2014, Jiang Jiang wrote: Since Peter is not responding, Hi Jiang Jiang, that was on purpose because I am not the

Re: [XeTeX] CID-keyed font support?

2014-07-24 Thread Jiang Jiang
On Thu, Jul 24, 2014 at 6:27 PM, Khaled Hosny khaledho...@eglug.org wrote: On Thu, Jul 24, 2014 at 09:01:32AM +0200, Jiang Jiang wrote: Hi, On Thu, Jul 24, 2014 at 8:07 AM, Peter Breitenlohner p...@mppmu.mpg.de wrote: On Wed, 23 Jul 2014, Jiang Jiang wrote: Since Peter is not

Re: [XeTeX] CID-keyed font support?

2014-07-24 Thread Ulrike Fischer
Am Thu, 24 Jul 2014 18:27:39 +0200 schrieb Khaled Hosny: OK, sorry about that. So who is the maintainer of dvipdfm-x then? I partly do, and it happens that I was in the middle of some major refactoring removing most of the different font loading paths between dvipdfmx and xdvipdfmx (in

Re: [XeTeX] CID-keyed font support?

2014-07-24 Thread Khaled Hosny
On Thu, Jul 24, 2014 at 07:18:10PM +0200, Jiang Jiang wrote: On Thu, Jul 24, 2014 at 6:27 PM, Khaled Hosny khaledho...@eglug.org wrote: On Thu, Jul 24, 2014 at 09:01:32AM +0200, Jiang Jiang wrote: Hi, On Thu, Jul 24, 2014 at 8:07 AM, Peter Breitenlohner p...@mppmu.mpg.de wrote: On

Re: [XeTeX] CID-keyed font support?

2014-07-24 Thread Khaled Hosny
On Thu, Jul 24, 2014 at 08:12:56PM +0200, Ulrike Fischer wrote: Am Thu, 24 Jul 2014 18:27:39 +0200 schrieb Khaled Hosny: OK, sorry about that. So who is the maintainer of dvipdfm-x then? I partly do, and it happens that I was in the middle of some major refactoring removing most of

Re: [XeTeX] CID-keyed font support?

2014-07-23 Thread Jiang Jiang
Hi Khaled, Since Peter is not responding, what do you think of this patch? Should I go ahead and commit this to TeXLive repository? People had been using it for a few days with various CID-keyed fonts and haven't reported any more issue. - Jiang

Re: [XeTeX] CID-keyed font support?

2014-07-23 Thread Akira Kakuto
Hi Jiang Jiang, I'll apply your patch. Peter will correct if it is necessary. Done (r34700). If something is wrong, please report. Best, Akira -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex

Re: [XeTeX] CID-keyed font support?

2014-07-23 Thread Akira Kakuto
Hi Jiang Jiang, Do you by any chance know how regular or how soon will TeXLive update to receive patched binary packages? Binaries are in principle not updated until the next year. Thus interested users should compile it themselves. Best, Akira

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
Hi Akira, On Sat, Jul 19, 2014 at 1:29 AM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang, In case you or anyone else are interested, I just posted two patches to xdvipdfmx to fix this problem: https://gist.github.com/jjgod/c1194a9b371848aaa746 Thanks very much. I've

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Akira Kakuto
Dear Jiang Jiang, In case you or anyone else are interested, I just posted two patches to xdvipdfmx to fix this problem: https://gist.github.com/jjgod/c1194a9b371848aaa746 I've succeeded (with 2 or 3 changes for late declarations of variables, since my compiler is foolish) with

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Akira Kakuto
Dear Jiang Jiang, But there are many warnings, probably for non-CJK fonts: The warnings disappear if I apply an attached patch: type0.c.diff. Best, Akira type0.c.diff Description: Binary data -- Subscriptions, Archive, and List information,

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
On Sat, Jul 19, 2014 at 1:40 PM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang, But there are many warnings, probably for non-CJK fonts: The warnings disappear if I apply an attached patch: type0.c.diff. I'm not sure if the last section is correct as it will very likely

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
Hi, On Sat, Jul 19, 2014 at 3:12 PM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang , I will take a look at the warnings for non-CJK fonts. Thanks. In addition, I think it is necessary to refine for dvipdfmx. The patched sources do not compile as dvipdfmx. Right, I can

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Akira Kakuto
Dear Jiang Jiang , I will take a look at the warnings for non-CJK fonts. If I use your Type0Font_create_ToUnicode_stream(font); for case CIDFONT_TYPE2: and the original otf_create_ToUnicode_stream() for default: there are no warnings, and I could copy and paste Japanese character strings.

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
On Sat, Jul 19, 2014 at 4:11 PM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang , I will take a look at the warnings for non-CJK fonts. If I use your Type0Font_create_ToUnicode_stream(font); for case CIDFONT_TYPE2: and the original otf_create_ToUnicode_stream() for

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Akira Kakuto
Dear Jiang Jiang, Yes, if you look at the logic there, it was trying to resolve the ToUnicode CMap by first attempting to load SourceHanSansJP-UTF16-H in texmf tree (with kpathsea), if this couldn't be found it will try SourceHanSansJP-UCS2-H instead, if that couldn't be found it will have to

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
On Sat, Jul 19, 2014 at 4:34 PM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang, Yes, if you look at the logic there, it was trying to resolve the ToUnicode CMap by first attempting to load SourceHanSansJP-UTF16-H in texmf tree (with kpathsea), if this couldn't be found it will

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Akira Kakuto
Dear Jiang Jiang, In the case of dvipdfmx, we usually write in a map file, cid-x.map for example, like gbm UniSourceHanSansJP-UTF16-H SourceHanSansJP-Regular.otf where gbm means a tfm: gbm.tfm. Yes, I understand that and had spent quite amount of time getting such map file right, but I

Re: [XeTeX] CID-keyed font support?

2014-07-19 Thread Jiang Jiang
On Sun, Jul 20, 2014 at 12:50 AM, Akira Kakuto kak...@fuk.kindai.ac.jp wrote: Dear Jiang Jiang, I updated the gist (https://gist.github.com/jjgod/c1194a9b371848aaa746) again to fix the following issues: Thank you very much. I think all is ok now. It compiles as the driver dvipdfmx for

Re: [XeTeX] CID-keyed font support?

2014-07-18 Thread Dohyun Kim
2014-07-18 0:00 GMT+09:00 Jiang Jiang gzjj...@gmail.com: Hi, I wonder if this has been discussed before but I have been wondering if CID-keyed fonts are supported by XeTeX/xdvipdfmx at all. Recent release of Source Han Sans [1] brought up the question again. If you install Source Han Sans

Re: [XeTeX] CID-keyed font support?

2014-07-18 Thread Jiang Jiang
On Fri, Jul 18, 2014 at 10:52 AM, Dohyun Kim nomosno...@gmail.com wrote: 2014-07-18 0:00 GMT+09:00 Jiang Jiang gzjj...@gmail.com: Hi, I wonder if this has been discussed before but I have been wondering if CID-keyed fonts are supported by XeTeX/xdvipdfmx at all. Recent release of Source Han

Re: [XeTeX] CID-keyed font support?

2014-07-18 Thread Akira Kakuto
Dear Jiang Jiang, In case you or anyone else are interested, I just posted two patches to xdvipdfmx to fix this problem: https://gist.github.com/jjgod/c1194a9b371848aaa746 Thanks very much. I've succeeded (with 2 or 3 changes for late declarations of variables, since my compiler is foolish)

[XeTeX] CID-keyed font support?

2014-07-17 Thread Jiang Jiang
Hi, I wonder if this has been discussed before but I have been wondering if CID-keyed fonts are supported by XeTeX/xdvipdfmx at all. Recent release of Source Han Sans [1] brought up the question again. If you install Source Han Sans CN Regular for instance, the following document: