[NTG-context] Automatic replacement?

luigi scarso luigi.scarso at gmail.com
Fri May 3 18:40:59 CEST 2013


On Fri, May 3, 2013 at 5:20 PM, "H. Özoguz" <h.oezoguz at mmnetz.de> wrote:

> Thanks luigi, but it does not work for my characters, see here:
>
> \definefont[tradoa][name:**trado*arabic at 20pt] % or
> file:amiri-regular.ttf*... file:alq.ttf
>
> \directlua{ local function replace_txt (buffer)
> buffer=string.gsub(buffer,"**اللهِ","اللَّـه") return buffer end
> callback.register("process_**input_buffer",replace_txt)
> }
> \starttext
> my text {\setupalign[r2l] \tradoa اللَّـه}
> \stoptext
>
> "trado" ist just the font "traditional arabic", nearly every system have
> it, so you should be able to compile this. It does not replace the
> character.
>
> my fault, sorry.
In the  string library  the function are not unicode aware (of course, I
should say...) .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130503/28f23995/attachment.html>


More information about the ntg-context mailing list