ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Thank you for the Chinese support, but still one question.
       [not found] <68bfdc900808072340v4462a9f8y22060e0e7516fd13@mail.gmail.com>
@ 2008-08-08  9:55 ` Hans Hagen
  2008-08-11  5:13   ` Longmin Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2008-08-08  9:55 UTC (permalink / raw)
  To: Yue Wang, mailing list for ConTeXt users

Yue Wang wrote:
> Hi, Hans:
> 
> Today I am trying to compile my new book chapter on aerosol science
> using MKIV. It works great! Thank you.
> Most commands are successful (rm, ss, mono)  after I define a
> typescript for the Chinese font.
> commands like \bfa also works.
> However, basic TeX commands like \bf, \it, don't work.
> I attach a minimal example in the mail.
> Is there anything wrong in the document? Thank you.

there was a bug as well as the fact that your definition is wrong

% engine=luatex

\ctxlua{fonts.collections.trace = true}

\definefontfeature[zh][mode=node,script=hang,lang=zhs]

\starttypescript [serif] [zhfont]
     \definefontsynonym [zhserif]          [AdobeSongStd-Light] 
[features=zh]
     \definefontsynonym [zhserifbold]      [AdobeHeitiStd-Regular] 
[features=zh]
     \definefontfallback[serifwhatever]    [lmroman10-regular] 
[0x0000-0x0400] [force=yes]
     \definefontfallback[serifboldwhatever][lmroman10-bold] 
[0x0000-0x0400] [force=yes]
\stoptypescript

\starttypescript [serif] [zhfont] [name]
     \definefontsynonym[Serif]    [zhserif]    [fallbacks=serifwhatever]
     \definefontsynonym[SerifBold][zhserifbold][fallbacks=serifboldwhatever]
\stoptypescript

\starttypescript[myfont]
     \definetypeface[myfont][rm][serif][zhfont]
\stoptypescript

\usetypescript[myfont]
\setupbodyfont[myfont, rm, 12pt]

\starttext
     A 字体测试。 {\bf A 字体测试。{\tfx A 字体测试。 \bfx A 字体测试。} }
\stoptext

works with the beta (i uploaded a new version)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Thank you for the Chinese support, but still one question.
  2008-08-08  9:55 ` Thank you for the Chinese support, but still one question Hans Hagen
@ 2008-08-11  5:13   ` Longmin Wang
  2008-08-11  9:07     ` Hans Hagen
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Longmin Wang @ 2008-08-11  5:13 UTC (permalink / raw)
  To: ntg-context

On Fri, Aug 08, 2008 at 11:55:21AM +0200, Hans Hagen wrote:
>there was a bug as well as the fact that your definition is wrong
>
>% engine=luatex
>
>\ctxlua{fonts.collections.trace = true}
>
>\definefontfeature[zh][mode=node,script=hang,lang=zhs]
>
>\starttypescript [serif] [zhfont]
>     \definefontsynonym [zhserif]          [AdobeSongStd-Light] 
>[features=zh]
>     \definefontsynonym [zhserifbold]      [AdobeHeitiStd-Regular] 
>[features=zh]
>     \definefontfallback[serifwhatever]    [lmroman10-regular] 
>[0x0000-0x0400] [force=yes]
>     \definefontfallback[serifboldwhatever][lmroman10-bold] 
>[0x0000-0x0400] [force=yes]
>\stoptypescript
>
>\starttypescript [serif] [zhfont] [name]
>     \definefontsynonym[Serif]    [zhserif]    [fallbacks=serifwhatever]
>     \definefontsynonym[SerifBold][zhserifbold][fallbacks=serifboldwhatever]
>\stoptypescript
>
>\starttypescript[myfont]
>     \definetypeface[myfont][rm][serif][zhfont]
>\stoptypescript
>
>\usetypescript[myfont]
>\setupbodyfont[myfont, rm, 12pt]
>
>\starttext
>     A 字体测试。 {\bf A 字体测试。{\tfx A 字体测试。 \bfx A 字体测试。} }
>\stoptext
>
>works with the beta (i uploaded a new version)
>
>Hans

Hi, Hans, Thank you for the great works. But there is still a problem when
I test a more complicated file which is attached below. In this file,
both \bf and \bi give the same font lmroman10-bold.

I guess the reason is that I use the same Chinese font
AdobeHeitiStd-Regular for both SerifBold and SerifBoldItalic. But this
cannot be avoided since Chinese fonts have much fewer typefaces than
English fonts.

Would you give some suggestions to solve this problem? Thanks a lot.

Longmin Wang

The test file:
--------------------------------------
% engine=luatex
\ctxlua{fonts.collections.trace = true}
\definefontfeature[zh][mode=node,script=hang,lang=zhs]

\starttypescript [serif] [zhfont]
    \definefontsynonym [zhserif][AdobeSongStd-Light][features=zh]
    \definefontsynonym [zhserifbold][AdobeHeitiStd-Regular][features=zh]
    \definefontsynonym [zhserifitalic][AdobeKaitiStd-Regular][features=zh]
    \definefontsynonym [zhserifbolditalic][AdobeHeitiStd-Regular][features=zh]

    \definefontfallback[serifwhatever][lmroman10-regular][0x0000-0x0400][force=yes]
    \definefontfallback[serifboldwhatever][lmroman10-bold][0x0000-0x0400][force=yes]
    \definefontfallback[serifitalicwhatever][lmroman10-italic][0x0000-0x0400][force=yes]
    \definefontfallback[serifbolditalicwhatever][lmroman10-bolditalic][0x0000-0x0400][force=yes]
\stoptypescript

\starttypescript [serif][zhfont][name]
    \definefontsynonym[Serif][zhserif][fallbacks=serifwhatever]
    \definefontsynonym[SerifBold][zhserifbold][fallbacks=serifboldwhatever]
    \definefontsynonym[SerifItalic][zhserifitalic][fallbacks=serifitalicwhatever]
    \definefontsynonym[SerifBoldItalic][zhserifbolditalic][fallbacks=serifbolditalicwhatever]
\stoptypescript

\starttypescript[myfont]
    \definetypeface[myfont][rm][serif][zhfont]
\stoptypescript

\usetypescript[myfont]
\setupbodyfont[myfont, rm, 12pt]

\starttext

fonts {\bf fonts} {\bi fonts} {\it fonts}

\stoptext
-- 
Longmin Wang <longminwang@gmail.com>
Math. Dept., Nankai Univ., China
http://math.nankai.edu.cn/~wanglm/
GnuPG-Key ID: 1024D/2A5CFA5C
Fingerprint: 8587 1246 3AAD C185 D419  ADF1 B620 D8B8 2A5C FA5C
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Thank you for the Chinese support, but still one question.
  2008-08-11  5:13   ` Longmin Wang
@ 2008-08-11  9:07     ` Hans Hagen
  2008-08-11 10:17     ` Hans Hagen
       [not found]     ` <68bfdc900810240612k739c36cev74883f48b209e541@mail.gmail.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2008-08-11  9:07 UTC (permalink / raw)
  To: ntg-context

Longmin Wang wrote:

> Hi, Hans, Thank you for the great works. But there is still a problem when
> I test a more complicated file which is attached below. In this file,
> both \bf and \bi give the same font lmroman10-bold.
> 
> I guess the reason is that I use the same Chinese font
> AdobeHeitiStd-Regular for both SerifBold and SerifBoldItalic. But this

indeed, the name+featureset+size is unique, but fallbacks are not part 
of that hash

> cannot be avoided since Chinese fonts have much fewer typefaces than
> English fonts.
> 
> Would you give some suggestions to solve this problem? Thanks a lot.

i'll have a look at it, but it involves some changes in the lua code 
dealing with font definitions (unique hashes and such)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Thank you for the Chinese support, but still one question.
  2008-08-11  5:13   ` Longmin Wang
  2008-08-11  9:07     ` Hans Hagen
@ 2008-08-11 10:17     ` Hans Hagen
  2008-08-11 13:55       ` Longmin Wang
       [not found]     ` <68bfdc900810240612k739c36cev74883f48b209e541@mail.gmail.com>
  2 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2008-08-11 10:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Longmin Wang wrote:

> Hi, Hans, Thank you for the great works. But there is still a problem when
> I test a more complicated file which is attached below. In this file,
> both \bf and \bi give the same font lmroman10-bold.

experimental patch in beta

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Thank you for the Chinese support, but still one question.
  2008-08-11 10:17     ` Hans Hagen
@ 2008-08-11 13:55       ` Longmin Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Longmin Wang @ 2008-08-11 13:55 UTC (permalink / raw)
  To: ntg-context

On Mon, Aug 11, 2008 at 12:17:15PM +0200, Hans Hagen wrote:
>Longmin Wang wrote:
>
>> Hi, Hans, Thank you for the great works. But there is still a problem when
>> I test a more complicated file which is attached below. In this file,
>> both \bf and \bi give the same font lmroman10-bold.
>
>experimental patch in beta
>

Now it works fine. Thank you. 

-- 
Longmin Wang <longminwang@gmail.com>
Math. Dept., Nankai Univ., China
http://math.nankai.edu.cn/~wanglm/
GnuPG-Key ID: 1024D/2A5CFA5C
Fingerprint: 8587 1246 3AAD C185 D419  ADF1 B620 D8B8 2A5C FA5C
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Fwd:  Thank you for the Chinese support, but still one question.
       [not found]     ` <68bfdc900810240612k739c36cev74883f48b209e541@mail.gmail.com>
@ 2008-10-30  7:58       ` Hans Hagen
  2008-10-30  9:41         ` Yanrui Li
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2008-10-30  7:58 UTC (permalink / raw)
  To: Yue Wang, mailing list for ConTeXt users, Thomas A. Schmitz

> Hi, Hans, Thank you for the great works. But there is still a problem when
> I test a more complicated file which is attached below. In this file,
> both \bf and \bi give the same font lmroman10-bold.
> 
> I guess the reason is that I use the same Chinese font
> AdobeHeitiStd-Regular for both SerifBold and SerifBoldItalic. But this
> cannot be avoided since Chinese fonts have much fewer typefaces than
> English fonts.
> 
> Would you give some suggestions to solve this problem? Thanks a lot.
> 
> Longmin Wang

i uploaded a beta

for some reason the fallbacks were not part of the hash that i use to
keep track of uniqueness of definitions

it seems to work ok now in the beta

this might also solve some of Thomas's problems

there will probably be a new current later today

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Fwd: Thank you for the Chinese support, but still one question.
  2008-10-30  7:58       ` Fwd: " Hans Hagen
@ 2008-10-30  9:41         ` Yanrui Li
  0 siblings, 0 replies; 7+ messages in thread
From: Yanrui Li @ 2008-10-30  9:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2008/10/30 Hans Hagen <pragma@wxs.nl>:

> i uploaded a beta
>
> for some reason the fallbacks were not part of the hash that i use to
> keep track of uniqueness of definitions
>
> it seems to work ok now in the beta
>
> this might also solve some of Thomas's problems
>
> there will probably be a new current later today
>
> Hans

 It runs fine. Thanks for the update very much.

-- 
Best wishes,
Li Yanrui
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2008-10-30  9:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <68bfdc900808072340v4462a9f8y22060e0e7516fd13@mail.gmail.com>
2008-08-08  9:55 ` Thank you for the Chinese support, but still one question Hans Hagen
2008-08-11  5:13   ` Longmin Wang
2008-08-11  9:07     ` Hans Hagen
2008-08-11 10:17     ` Hans Hagen
2008-08-11 13:55       ` Longmin Wang
     [not found]     ` <68bfdc900810240612k739c36cev74883f48b209e541@mail.gmail.com>
2008-10-30  7:58       ` Fwd: " Hans Hagen
2008-10-30  9:41         ` Yanrui Li

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).