ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Two problems about CJK fonts with the beta (2010.05.22)
@ 2010-05-23  7:22 Li Yanrui (李延瑞)
  2010-05-23  8:04 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Li Yanrui (李延瑞) @ 2010-05-23  7:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

Hi,

1. The characters overlaps each other and can not be set size.

The is a mini example.

\definefont[song][name:simsun at 12pt]
\starttext

\song 测试

\stoptext

The attachment is its output.

2. the cid fonts cause MkIV gives a waring as following:

  LuaTeX warning: lua-loaded font [44]
(/usr/share/fonts/adobe/AdobeSongStd-Light) has no characters!


-- 
Best regards,

Li Yanrui (李延瑞)

[-- Attachment #2: a.pdf --]
[-- Type: application/pdf, Size: 8832 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 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: Two problems about CJK fonts with the beta (2010.05.22)
  2010-05-23  7:22 Two problems about CJK fonts with the beta (2010.05.22) Li Yanrui (李延瑞)
@ 2010-05-23  8:04 ` Taco Hoekwater
  2010-05-23  8:34   ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2010-05-23  8:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hi,

Li Yanrui (李延瑞) wrote:
> Hi,
> 
> 1. The characters overlaps each other and can not be set size.
> 
> The is a mini example.
> 
> \definefont[song][name:simsun at 12pt]
> \starttext
> 
> \song 测试
> 
> \stoptext
> 
> The attachment is its output.

Verified.

This actually looked fine here with the current 2010.05.21 11:10,
but the beta 2010.05.22 12:06 MKIV is broken, producing the same
output you have.

> 2. the cid fonts cause MkIV gives a waring as following:
> 
>   LuaTeX warning: lua-loaded font [44]
> (/usr/share/fonts/adobe/AdobeSongStd-Light) has no characters!

Verified, same here, even with the official current.

\definefont[song][name:adobesongstd-light at 12pt]
\starttext

\song 测试

\stoptext


Best wishes,
Taco

___________________________________________________________________________________
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: Two problems about CJK fonts with the beta (2010.05.22)
  2010-05-23  8:04 ` Taco Hoekwater
@ 2010-05-23  8:34   ` Taco Hoekwater
  2010-05-23  8:43     ` Taco Hoekwater
  2010-05-23 11:39     ` Khaled Hosny
  0 siblings, 2 replies; 5+ messages in thread
From: Taco Hoekwater @ 2010-05-23  8:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Taco Hoekwater wrote:
> 
> Hi,
> 
> Li Yanrui (李延瑞) wrote:
>> Hi,
>>
>> 1. The characters overlaps each other and can not be set size.
>>
>> The is a mini example.
>>
>> \definefont[song][name:simsun at 12pt]
>> \starttext
>>
>> \song 测试
>>
>> \stoptext
>>
>> The attachment is its output.
> 
> Verified.
> 
> This actually looked fine here with the current 2010.05.21 11:10,
> but the beta 2010.05.22 12:06 MKIV is broken, producing the same
> output you have.

Some debugging applied. This line in font-otf.lua:

   tfm.format = (metadata.order2 == 1 and 'truetype') or 'opentype'

produces 'opentype' for simsun.ttf, and so all glyphs are printed
at 2.048 times the normal size in the PDF output.

This is because the key metadata.order2 doesn't exist _anywhere_ in
the context source (except in this test). But neither did it exist in
the official current. The context current did tfm.format later.

Patch to revert back to the current's behaviour:

--- font-otf.lua~ 2010-05-23 10:20:10.979586135 +0200
+++ font-otf.lua  2010-05-23 10:31:14.153587544 +0200
@@ -1653,6 +1652,13 @@
          local otfdata = tfmtable.shared.otfdata
          tfmtable.name = specification.name
          tfmtable.sub = specification.sub
+        if otfdata.metadata.order2 == 0 then
+            tfmtable.format = 'opentype'
+        elseif otfdata.metadata.order2 == 1 then
+            tfmtable.format = 'truetype'
+        else
+            tfmtable.format = specification.format
+        end
          local s = specification.size
          local m = otfdata.metadata.math
          if m then


>> 2. the cid fonts cause MkIV gives a waring as following:
>>
>>   LuaTeX warning: lua-loaded font [44]
>> (/usr/share/fonts/adobe/AdobeSongStd-Light) has no characters!
> 
> Verified, same here, even with the official current.

Something is broken in the handling of the 'subfonts' key, but I haven't
figured out what (yet?).

Best wishes,
Taco

___________________________________________________________________________________
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: Two problems about CJK fonts with the beta (2010.05.22)
  2010-05-23  8:34   ` Taco Hoekwater
@ 2010-05-23  8:43     ` Taco Hoekwater
  2010-05-23 11:39     ` Khaled Hosny
  1 sibling, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2010-05-23  8:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Taco Hoekwater wrote:
>>> 2. the cid fonts cause MkIV gives a waring as following:
>>>
>>>   LuaTeX warning: lua-loaded font [44]
>>> (/usr/share/fonts/adobe/AdobeSongStd-Light) has no characters!
>>
>> Verified, same here, even with the official current.
> 
> Something is broken in the handling of the 'subfonts' key, but I haven't
> figured out what (yet?).

The 'merge cid fonts' enhancer is broken. It starts by testing
data.glyphs, but this is the field it is supposed to fill (!).

The patch is a one-liner:

--- font-otf.lua~ 2010-05-23 10:20:10.979586135 +0200
+++ font-otf.lua  2010-05-23 10:39:51.954338034 +0200
@@ -576,7 +576,7 @@
  otf.enhancers["merge cid fonts"] = function(data,filename)
      -- we can also move the names to data.luatex.names which might
      -- save us some more memory (at the cost of harder tracing)
-    if data.subfonts and data.glyphs and next(data.glyphs) then
+    if data.subfonts then
          local cidinfo = data.cidinfo
          local verbose = fonts.verbose
          if cidinfo.registry then
___________________________________________________________________________________
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: Two problems about CJK fonts with the beta (2010.05.22)
  2010-05-23  8:34   ` Taco Hoekwater
  2010-05-23  8:43     ` Taco Hoekwater
@ 2010-05-23 11:39     ` Khaled Hosny
  1 sibling, 0 replies; 5+ messages in thread
From: Khaled Hosny @ 2010-05-23 11:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, May 23, 2010 at 10:34:30AM +0200, Taco Hoekwater wrote:
> Taco Hoekwater wrote:
> >
> >Hi,
> >
> >Li Yanrui (李延瑞) wrote:
> >>Hi,
> >>
> >>1. The characters overlaps each other and can not be set size.
> >>
> >>The is a mini example.
> >>
> >>\definefont[song][name:simsun at 12pt]
> >>\starttext
> >>
> >>\song 测试
> >>
> >>\stoptext
> >>
> >>The attachment is its output.
> >
> >Verified.
> >
> >This actually looked fine here with the current 2010.05.21 11:10,
> >but the beta 2010.05.22 12:06 MKIV is broken, producing the same
> >output you have.
> 
> Some debugging applied. This line in font-otf.lua:
> 
>   tfm.format = (metadata.order2 == 1 and 'truetype') or 'opentype'
> 
> produces 'opentype' for simsun.ttf, and so all glyphs are printed
> at 2.048 times the normal size in the PDF output.
> 
> This is because the key metadata.order2 doesn't exist _anywhere_ in
> the context source (except in this test). But neither did it exist in
> the official current. The context current did tfm.format later.
> 
> Patch to revert back to the current's behaviour:
> 
> --- font-otf.lua~ 2010-05-23 10:20:10.979586135 +0200
> +++ font-otf.lua  2010-05-23 10:31:14.153587544 +0200
> @@ -1653,6 +1652,13 @@
>          local otfdata = tfmtable.shared.otfdata
>          tfmtable.name = specification.name
>          tfmtable.sub = specification.sub
> +        if otfdata.metadata.order2 == 0 then
> +            tfmtable.format = 'opentype'
> +        elseif otfdata.metadata.order2 == 1 then
> +            tfmtable.format = 'truetype'
> +        else
> +            tfmtable.format = specification.format
> +        end
>          local s = specification.size
>          local m = otfdata.metadata.math
>          if m then

I'm wondering if the 'if' statment is even necessary, metadata.order2
doesn't exist neither in context nor in luatex generated tables, so the
above statment always resolve to 'tfmtable.format = specification.format'.
-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___________________________________________________________________________________
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:[~2010-05-23 11:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-23  7:22 Two problems about CJK fonts with the beta (2010.05.22) Li Yanrui (李延瑞)
2010-05-23  8:04 ` Taco Hoekwater
2010-05-23  8:34   ` Taco Hoekwater
2010-05-23  8:43     ` Taco Hoekwater
2010-05-23 11:39     ` Khaled Hosny

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