* newotf, problem with .ttc fonts
@ 2015-07-11 21:27 Rik Kabel
2015-07-11 23:34 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Rik Kabel @ 2015-07-11 21:27 UTC (permalink / raw)
To: ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 1370 bytes --]
It appears that the newotf mechanism does not handle .ttc fonts. The
following MWE uses fonts found on Windows 8.1:
\usemodule [newotf]
%% the following fonts, all .ttc, fail in the same way:
% C:/ConTeXt/tex/texmf-context/tex/context/base/font-oup.lua:651:
bad argument #1 to '(for generator)' (table expected, got nil)
%\definefont [testfont] [MSMincho sa 1]
%\definefont [testfont] [MingLiU sa 1]
%\definefont [testfont] [Gulim sa 1]
%\definefont [testfont] [Batang sa 1]
%\definefont [testfont] [msyh sa 1] % Microsoft YaHei
%\definefont [testfont] [msjh sa 1] % Microsoft JhengHei
%\definefont [testfont] [SimSun sa 1]
%% the following, none .ttc, work:
%\definefont [testfont] [arialuni sa 1] % Arial Unicode MS
%\definefont [testfont] [yugothic sa 1] % Yu Gothic
%\definefont [testfont] [yumin sa 1] % Yu Mincho
%\definefont [testfont] [kaiu sa 1] % DFKai-SB Regular
%\definefont [testfont] [simfang sa 1] % FangSong Regular
%\definefont [testfont] [simhei sa 1] % SimHei Regular
\definefont [testfont] [simkai sa 1] % KaTi Regular
\starttext
Confucius’ {\em Analects} ({\testfont 論語} {\em LunYu}).
\stoptext
Without the new module, this works with all of the test fonts.
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 1988 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] 2+ messages in thread
* Re: newotf, problem with .ttc fonts
2015-07-11 21:27 newotf, problem with .ttc fonts Rik Kabel
@ 2015-07-11 23:34 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2015-07-11 23:34 UTC (permalink / raw)
To: ntg-context
On 7/11/2015 11:27 PM, Rik Kabel wrote:
> It appears that the newotf mechanism does not handle .ttc fonts. The
> following MWE uses fonts found on Windows 8.1:
>
> \usemodule [newotf]
> %% the following fonts, all .ttc, fail in the same way:
> % C:/ConTeXt/tex/texmf-context/tex/context/base/font-oup.lua:651:
> bad argument #1 to '(for generator)' (table expected, got nil)
> %\definefont [testfont] [MSMincho sa 1]
> %\definefont [testfont] [MingLiU sa 1]
> %\definefont [testfont] [Gulim sa 1]
> %\definefont [testfont] [Batang sa 1]
> %\definefont [testfont] [msyh sa 1] % Microsoft YaHei
> %\definefont [testfont] [msjh sa 1] % Microsoft JhengHei
> %\definefont [testfont] [SimSun sa 1]
> %% the following, none .ttc, work:
> %\definefont [testfont] [arialuni sa 1] % Arial Unicode MS
> %\definefont [testfont] [yugothic sa 1] % Yu Gothic
> %\definefont [testfont] [yumin sa 1] % Yu Mincho
> %\definefont [testfont] [kaiu sa 1] % DFKai-SB Regular
> %\definefont [testfont] [simfang sa 1] % FangSong Regular
> %\definefont [testfont] [simhei sa 1] % SimHei Regular
> \definefont [testfont] [simkai sa 1] % KaTi Regular
>
> \starttext
> Confucius’ {\em Analects} ({\testfont 論語} {\em LunYu}).
> \stoptext
>
> Without the new module, this works with all of the test fonts.
font-otl.lua, around line 254:
data = otfreaders.loadfont(filename,sub or 1)
add the "or 1"
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] 2+ messages in thread
end of thread, other threads:[~2015-07-11 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11 21:27 newotf, problem with .ttc fonts Rik Kabel
2015-07-11 23:34 ` Hans Hagen
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).