Re: [NTG-context] Palatino patch for the current ConTeXt version
On 11/17/2013 12:23 PM, honyk wrote:
Hello Everyone,
I am trying to fix a Palatino small caps issue using the procedure explained here: http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
That fix seems to be obsolete nowadays and returning errors.
I've changed fonts.otf.enhancers.patches["^pala"] to fonts.handlers.otf.enhancers.patches["^pala"] which compiles, but it does nothing.
I've also tried this variant, but that 'patch' function is never called even though I clear my font cache every run:
\startluacode local fonts = fonts local otf = fonts.handlers.otf local patches = otf.enhancers.patches local register = patches.register local report = patches.report
function patch (data,filename) report("I am here") report("processing data %s", table.serialize(data)) end
register("after","prepare glyphs","^pala", patch) \stopluacode
Any idea?
patches are applied when a font is cached so you need to wipe the cache after defining such a patch there are several ways to apply patches runtime, see *.lfg files (and also fonts-mkiv.pdf) 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 2013-11-17 Hans Hagen wrote:
On 11/17/2013 12:23 PM, honyk wrote:
Hello Everyone,
I am trying to fix a Palatino small caps issue using the procedure explained here: http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
That fix seems to be obsolete nowadays and returning errors.
there are several ways to apply patches runtime, see *.lfg files (and also fonts-mkiv.pdf)
1) I've created a sample LFG file 2) placed it into the folder where other LFG files are stored 3) removed pala.tma and pala.tmc files from the cache 4) triggered the generating My pala.lfg file seems to be ignored: return { name = "pala", comment = "Switching the small capped 'i' to a dotless variant in Palatino Linotype.", remapping = { tounicode = true, unicodes = { ["i.sc"] = 983201, }, }, } 1) How the LFG file is matched with the font? Is it via the 'name' parameter, "pala" in my case? Does that name equals to the file title without an extension or something else? 2) Should I see that comment in the log or is it just a remark for editors? 3) Can I emulate this patch via direct editing of pala.tma file? When I change the 'unicodes' value there, it has no impact on generating (nothing changes in the output). Thanks, Jan
participants (2)
-
Hans Hagen
-
Jan Tosovsky