On Sun, Nov 2, 2014 at 11:19 AM, Herbert Voss <[email protected]> wrote:
> This is an example from the LuaTeX documentation (pp 166--167)
> which works well in the past.
>
> \directlua {
> callback.register('define_font',
> function (name,size)
> if name == 'cmr10-red' then
> f = font.read_tfm('cmr10',size)
> f.name = 'cmr10-red'
> f.type = 'virtual'
> f.fonts = {{ name = 'cmr10', size = size }}
> for i,v in pairs(f.characters) do
> if (string.char(i)):find('[tacohanshartmut]') then
> v.commands = {{'special','pdf: 1 0 0
> rg'},{'char',i},{'special','pdf:
> 0 g'},}
> else
> v.commands = {{'char',i}}
> end
> end
> else
> f = font.read_tfm(name,size)
> end
> return f
> end)
> }
>
> \font\myfont = cmr10-red at 10pt \myfont This is a line of text \par
> \font\myfontx= cmr10 at 10pt \myfontx Here is another line of text
>
> \bye
>
No seg fault with luatex experimental
$ luatex --version
This is LuaTeX, Version beta-0.79.2 (TeX Live 2015/dev)
--
luigi
test.pdf
Description: Adobe PDF document
