[NTG-context] Error with EBGaramond-Regular

luigi scarso luigi.scarso at gmail.com
Thu Jun 7 10:03:02 CEST 2012


Hi, from fontforge users list

On Thu, Jun 7, 2012 at 12:57 AM, Georg Duffner <g.duffner at gmail.com> wrote:
> Dear fellow fontforgers,
>
> in the last few days I’ve been experimenting with decomposition via
> Opentype. I’ve come to some results, but I’m not sure if I’ve done
> everything right because no engine does everything I want them to. So
> I’d please like to know, if I’ve committed some crime against Adobe’s
> laws, if anybody minds to enlighten me.
>
> Here’s the case, centered around some greek because it’ll probably be
> the most complicated use cases I’ll happen to have (at least I hope so):
> By means of a stylistic set (ss20) I decompose precomposed glyphs as by
> Unicode Normalization Tables like this:
>     sub uni1F8F by Alpha uni0345.cap uni0314.grkstack uni0342 ;
>     sub uni1F84 by alpha uni0345 uni0313.grk acutecomb.grkstack ;
>     sub uni1F4A by Omicron uni0313.grk gravecomb.grkstack ;
> etc.
>
> Now greek uppercase characters like to have accents appended left to
> them. So, they take more space there, which I solve with a contextual
> kerning rule like this:
>     pos Omicron' <157 0 157 0> @grk_tlAcc2;
> where @grk_tlAcc2 contains uni0313.grk, so it will be expanded by 157
> and repositioned by 157 to make place for the accents.
>
> The third set of rules aims at providing adscript i as alternate letter
> to iota subscriptum via Character variant:
>     sub uni0345.cap from [ uni0345.cap1 uni0345.cap2 ];
>
> This one, of course again needs more space, which I give them like this
> in the contextual kerning:
>     pos Alpha' <0 0 200 0> uni0345.cap1;
>     pos Alpha' <0 0 340 0> uni0345.cap2;
>     pos Omega' <121 0 436 0> uni0345.cap2 @grk_tlAcc2;
>     pos Omega' <121 0 461 0> uni0345.sc1 @grk_tlAcc2;
> so there is more space to the right, where the iota adscriptumg fits in.
>
> I’m asking, because I get four different results from four engines,
> namely XeLaTeX, LuaLaTeX, Firefox 12.0 (on Ubuntu Linux) and Fontforge
> itself (metrics window), where only Fontforge looks right. Now I’d like
> to know if my code is ok before I file bugs to the different groups.
>
> The testing files are:
> Web:
> http://georgduffner.at/ebgaramond/greektests.html
> PDF:
> http://georgduffner.at/ebgaramond/tests/lltx_greektests.pdf
> http://georgduffner.at/ebgaramond/tests/xltx_greektests.pdf
> Fonts:
> http://georgduffner.at/ebgaramond/EBGaramond-Regular.otf
> http://georgduffner.at/ebgaramond/EBGaramond-Regular.ttf
> Source:
> https://github.com/georgd/EB-Garamond
>
> Best regards,
> Georg

With the otf version

\usemodule[simplefonts]
\setmainfont[ebgaramond]
\starttext foo \stoptext

I have


fonts           > otf loading > loading:
/opt/luatex/standalone-bassenge/tex/texmf-project/fonts/EBGaramond-Regular.otf
(hash: ebgaramond-regular)
fonts           > otf loading > font loaded okay
fonts           > otf loading > file size: 349756
fonts           > encoding > loading (extended) adobe glyph list
! LuaTeX error ...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143:
attempt to get length of local 'ti' (a number value)
stack traceback:
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143: in
function 's_hashed'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1310: in
function 'enhancer'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:260: in
function 'enhance'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:282: in
function 'apply'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:457: in function 'load'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1938: in
function 'otftotfm'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1965: in
function <...enge/tex/texmf-context/tex/context/base/font-otf.lua:1964>
	(tail call): ?
	(tail call): ?
	(tail call): ?
	...enge/tex/texmf-context/tex/context/base/font-def.lua:286: in
function 'loadfont'
	...enge/tex/texmf-context/tex/context/base/font-ctx.lua:426: in
function 'loadfont'
	...enge/tex/texmf-context/tex/context/base/font-def.lua:400: in function 'read'
	...enge/tex/texmf-context/tex/context/base/font-ctx.lua:909: in
function 'definefont_two'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 11 in file test.mkiv: LuaTeX error  ...


I'm not  able to install the ttf version
but

\definefont[ebgaramond][EBGaramond-Regular.ttf at 12pt]
\starttext
\ebgaramond
foo
\stoptext

gives


fonts           > otf loading > loading: EBGaramond-Regular.ttf (hash:
ebgaramond-regular)
fonts           > otf loading > font loaded okay
fonts           > otf loading > file size: 631736
fonts           > encoding > loading (extended) adobe glyph list
! LuaTeX error ...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143:
attempt to get length of local 'ti' (a number value)
stack traceback:
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143: in
function 's_hashed'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1310: in
function 'enhancer'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:260: in
function 'enhance'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:282: in
function 'apply'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:457: in function 'load'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1938: in
function 'otftotfm'
	...enge/tex/texmf-context/tex/context/base/font-otf.lua:1965: in
function <...enge/tex/texmf-context/tex/context/base/font-otf.lua:1964>
	(tail call): ?
	(tail call): ?
	(tail call): ?
	...enge/tex/texmf-context/tex/context/base/font-def.lua:286: in
function 'loadfont'
	...enge/tex/texmf-context/tex/context/base/font-ctx.lua:426: in
function 'loadfont'
	...enge/tex/texmf-context/tex/context/base/font-def.lua:400: in function 'read'
	...enge/tex/texmf-context/tex/context/base/font-ctx.lua:909: in
function 'definefont_two'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 3 in file test.mkiv: LuaTeX error  ...



Fonts:
http://georgduffner.at/ebgaramond/EBGaramond-Regular.otf
http://georgduffner.at/ebgaramond/EBGaramond-Regular.ttf



-- 
luigi


More information about the ntg-context mailing list