Hi, One of the changes in mkiv font handling is that from now on we have mode=auto as default (beware, this is one of those mkiv only options and not supported in the generic variant). I don't know how well it works in practice but it does work out ok for cases like: \starttext \startTEXpage \definedfont[Serif*default at 20pt]fijn\par \definefontfeature[nlddefault][default][script=latn,language=nld] \definedfont[Serif*nlddefault at 20pt]fijn\par \stopTEXpage \stoptext Depending on the font, node mode takes more memory (and a bit more runtime) but you can always enforce base or node mode when you are unhappy with the automatically determined mode. 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 -----------------------------------------------------------------
On Sat, 26 Mar 2011 12:53:10 +0100
Hans Hagen
Hi,
One of the changes in mkiv font handling is that from now on we have mode=auto as default (beware, this is one of those mkiv only options and not supported in the generic variant).
Hans, I may be misunderstanding things, but I can't get my font features to work with the latest beta, possibly because of this change, or I'm doing something wrong. Here is an example: \definefontfeature[antikwa] [mode=node,language=dflt,script=latn,kern=yes,onum=yes] \starttypescript [serif] [test] \definefontsynonym [Serif] [file:antpoltlt-regular] \stoptypescript \starttypescript [test] \definetypeface[test] [rm] [serif] [test] [default] [features=antikwa] \stoptypescript \setupbodyfont[test] \starttext Test 1234567890 \stoptext This gives me oldstyle figures with the beta of 2011.02.25, but not with the latest beta. Is this a bug, or do I have to adapt my definitions? Thomas
Am 26.03.2011 um 22:04 schrieb Thomas Schmitz:
I may be misunderstanding things, but I can't get my font features to work with the latest beta, possibly because of this change, or I'm doing something wrong.
font-ini.mkiv (enable \inheritfromfontclass): - \newconditional\inheritfromfontclass % used in \definefont and \definedfont + \newconditional\inheritfromfontclass \settrue\inheritfromfontclass % used in \definefont and \definedfont font-ctx.lua (check “classfeatures” before “fontfeatures”): function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classfallbacks,fontfallbacks, mathsize,textsize,relativeid,classgoodies,goodies) ... if detail and detail ~= "" then specification.method, specification.detail = method or "*", detail elseif specification.detail and specification.detail ~= "" then -- already set - elseif fontfeatures and fontfeatures ~= "" then - specification.method, specification.detail = "*", fontfeatures - elseif classfeatures and classfeatures ~= "" then - specification.method, specification.detail = "*", classfeatures + elseif classfeatures and classfeatures ~= "" then + specification.method, specification.detail = "*", classfeatures + elseif fontfeatures and fontfeatures ~= "" then + specification.method, specification.detail = "*", fontfeatures end ... statistics.stoptiming(fonts) end Wolfgang
On Sun, 27 Mar 2011 08:52:38 +0200
Wolfgang Schuster
Am 26.03.2011 um 22:04 schrieb Thomas Schmitz:
I may be misunderstanding things, but I can't get my font features to work with the latest beta, possibly because of this change, or I'm doing something wrong.
font-ini.mkiv (enable \inheritfromfontclass):
- \newconditional\inheritfromfontclass % used in \definefont and \definedfont + \newconditional\inheritfromfontclass \settrue\inheritfromfontclass % used in \definefont and \definedfont
font-ctx.lua (check classfeatures before fontfeatures):
function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classfallbacks,fontfallbacks, mathsize,textsize,relativeid,classgoodies,goodies) ... if detail and detail ~= "" then specification.method, specification.detail = method or "*", detail elseif specification.detail and specification.detail ~= "" then -- already set - elseif fontfeatures and fontfeatures ~= "" then - specification.method, specification.detail = "*", fontfeatures - elseif classfeatures and classfeatures ~= "" then - specification.method, specification.detail = "*", classfeatures + elseif classfeatures and classfeatures ~= "" then + specification.method, specification.detail = "*", classfeatures + elseif fontfeatures and fontfeatures ~= "" then + specification.method, specification.detail = "*", fontfeatures end ... statistics.stoptiming(fonts) end
Wolfgang
Wolfgang, thanks a lot. This works with the minimal example I have created but breaks with a real file. I need to go deeper and construct another example. In the meantime, here's the error: system > logs > lua: compiling /home/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma into /home/tas/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc fonts > names > accessing the data table failed fonts > otf loading > loading: /home/tas/context/tex/texmf/fonts/opentype/gust/poltawski/antpolt-regular.otf (hash: antpolt-regular-oxoniensis) fonts > otf loading > font loaded okay fonts > otf loading > file size: 131876 mtx-context | fatal error: no return code, message: luatex: execution interrupted% The document doesn't use the poltawski font, so I'm very puzzled about the error message. Thomas
On 27-3-2011 8:52, Wolfgang Schuster wrote:
Am 26.03.2011 um 22:04 schrieb Thomas Schmitz:
I may be misunderstanding things, but I can't get my font features to work with the latest beta, possibly because of this change, or I'm doing something wrong.
font-ini.mkiv (enable \inheritfromfontclass):
- \newconditional\inheritfromfontclass % used in \definefont and \definedfont + \newconditional\inheritfromfontclass \settrue\inheritfromfontclass % used in \definefont and \definedfont
indeed (actually this conditional is introduced because i noticed that there was unexpected inheritance going on - esp the mp default font)
font-ctx.lua (check “classfeatures” before “fontfeatures”):
function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classfallbacks,fontfallbacks, mathsize,textsize,relativeid,classgoodies,goodies) ... if detail and detail ~= "" then specification.method, specification.detail = method or "*", detail elseif specification.detail and specification.detail ~= "" then -- already set - elseif fontfeatures and fontfeatures ~= "" then - specification.method, specification.detail = "*", fontfeatures - elseif classfeatures and classfeatures ~= "" then - specification.method, specification.detail = "*", classfeatures + elseif classfeatures and classfeatures ~= "" then + specification.method, specification.detail = "*", classfeatures + elseif fontfeatures and fontfeatures ~= "" then + specification.method, specification.detail = "*", fontfeatures end ... statistics.stoptiming(fonts) end
hm, so class features should always win? maybe we should make that configureable .. i cannot oversee the implication of this ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Sun, 27 Mar 2011 13:05:38 +0200
Hans Hagen
hm, so class features should always win? maybe we should make that configureable .. i cannot oversee the implication of this
I'm still trying to make a minimal example for my errors. It has something to do with lookups in a fea file (which work with version 11-02-25). I'm pretty unhappy atm, many of my custom fonts & typescripts do not work as they used to... Thomas
Hi Wolfgang
- \newconditional\inheritfromfontclass % used in \definefont and \definedfont + \newconditional\inheritfromfontclass \settrue\inheritfromfontclass % used in \definefont and \definedfont
I now have: \setnewconstant\featureinheritancefontnone \zerocount \setnewconstant\featureinheritancefontonly \plusone \setnewconstant\featureinheritanceclassonly \plustwo \setnewconstant\featureinheritancefontfirst \plusthree \setnewconstant\featureinheritanceclassfirst\plusfour \setnewconstant\featureinheritancedefault \featureinheritancefontfirst \setnewconstant\featureinheritancemode \featureinheritancedefault to play with ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Thomas Schmitz
-
Wolfgang Schuster