Open main menu

Changes

Next lua layer, which in this case is embed in a tex file:
<texcode>
 
\setupcolors[state=start]
 
 
\startluacode
function testFontforge(fontfile,letter)
testoutlines = python.import("test-fontforge")
s = testoutlines.simpledraw(fontfile)
g = s.getmpostoutlinedrawmpostpath(letter) p = s.getmpostpointsSugardrawmpostpoints(letter) --print( string.format("\%s = \%s ==", letter,g )) tex.sprint(tex.ctxcatcodes,"\\startMPcode") tex.sprint(tex.ctxcatcodes,"pickup pencircle scaled 1pt;") tex.sprint(tex.ctxcatcodes,string.format("draw \%s .. cycle;",g) ) tex.sprint(tex.ctxcatcodes,"pickup pencircle scaled 8pt;") tex.sprint(tex.ctxcatcodes,string.format("\%s",p) ) tex.sprint(tex.ctxcatcodes,"\\stopMPcode")
end
\stopluacode
And this is the result: <br/>
[[Image:Test-fontforge.png|900px]]
 
...ok,it's not correct (why?), but it looks funny :)
== Ghostscript ==