[luatex] Arabic alphabets are not connected

Yannis Haralambous yannis.haralambous at telecom-bretagne.eu
Sun Feb 8 16:44:34 CET 2009


at what moment are you doing contextual analysis? Without contextual  
analysis everything will be in isolated form...

Le 8 févr. 09 à 15:35, وفا خلیقی a écrit :

> I use the following test file but Arabic alphabets are not  
> connected. Do you know what should I do?
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \documentclass[a4paper,12pt]{article}
> \pdfoutput1
> \directlua0{
> callback.register('define_font',
>   function(name, size)
>     fonttype = nil
>     filename = kpse.find_file(name,"opentype fonts")
>     if (filename)
>     then fonttype = 'opentype'
>     else filename = kpse.find_file(name, "truetype fonts")
>     end
>     if filename and not fonttype then fonttype = 'truetype' end
>     if fonttype then
>       if (size < 0) then size = (- 655.36) * size end
>       ttffont = fontforge.to_table(fontforge.open(filename))
>       if ttffont then
>         f = { }
>         f.name = ttffont.fontname
>         f.fullname = ttffont.names[1].names.fullname
>         f.parameters = { }
>         f.designsize = size
>         f.size = size
>         direction = 0
>         f.parameters.slant = 0
>         f.parameters.space = size * 0.25
>         f.parameters.space_stretch = 0.3 * size
>         f.parameters.space_shrink = 0.1 * size
>         f.parameters.x_height = 0.4 * size
>         f.parameters.quad = 1.0 * size
>         f.parameters.extra_space = 0
>         f.characters = { }
>         local mag = size / ttffont.units_per_em
>
>          names_of_char = { }
>         for char, glyph in pairs(ttffont.map.map)
>         do
>           names_of_char[ttffont.glyphs[glyph].name]
>             = ttffont.map.backmap[glyph]
>         end
>
>         names_of_glyph = { }
>         for char, glyph in pairs(ttffont.map.map)
>         do
>           names_of_glyph[ttffont.glyphs[glyph].name]
>             = glyph
>         end
>
>        for char, glyph in pairs(ttffont.map.map)
>         do
>           glyph_table = ttffont.glyphs[glyph]
>
>           f.characters[char] = {
>             index = glyph,
>             width = glyph_table.width * mag,
>             name = glyph_table.name,
>           }
>           if glyph_table.boundingbox[4] then
>             f.characters[char].height = glyph_table.boundingbox[4] *  
> mag
>           end
>           if glyph_table.boundingbox[2] then
>             f.characters[char].depth = -glyph_table.boundingbox[2] *  
> mag
>           end
>
>           if glyph_table.kerns then
>             local kerns = { }
>             for _, kern in pairs(glyph_table.kerns)
>             do
>               kerns[names_of_char[kern.char]] = kern.off * mag
>             end
>           f.characters[char].kerns = kerns
>           end
>         end
>         f.filename = filename
>         f.type = 'real'
>         f.format = fonttype
>         f.embedding = "subset"
>         f.cidinfo = {
>           registry = "Adobe",
>           ordering = "Identity",
>           supplement = 0,
>           version = 1
>         }
>       end
>     else
>       f = font.read_tfm(name, size)
>     end
>   return f
>   end
> )
> }
>
> \pagedir TRT \bodydir TRT \textdir TRT \pardir TRT
> \font\test="IranNastaliq.ttf" at 12pt
> \begin{document}
> \test
> این یک آزمایش است.
> \end{document}
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
> -- 
> VK

--
+ 
-----------------------------------------------------------------------+
| Yannis Haralambous, Ph.D.      yannis.haralambous at telecom- 
bretagne.eu |
| Directeur d'Études                      http://omega.enstb.org/ 
yannis |
|                                             Tel. +33  
(0)2.29.00.14.27 |
|                                             Fax  +33  
(0)2.29.00.12.82 |
| Département  
Informatique                                              |
| Télécom  
Bretagne                                                      |
| Technopôle de Brest Iroise, CS 83818, 29238 Brest Cedex 3,  
France     |
| Coordonnées Google-Earth : 48°21'31.57"N  
4°34'16.76"W                 |
+ 
-----------------------------------------------------------------------+
                             ...pour distinguer l'extérieur d'un  
aquarium,
                                            mieux vaut n'être pas  
poisson

                            ...the ball I threw while playing in the  
park
                                           has not yet reached the  
ground

               Es gab eine Zeit, wo ich nur ungern über Schubert  
sprechen,
            nur Nächtens den Bäumen und Sternen von ihm vorerzählen  
mögen.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/luatex/attachments/20090208/8f7c5d06/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Yannis Haralambous.vcf
Type: text/directory
Size: 508 bytes
Desc: not available
Url : http://tug.org/pipermail/luatex/attachments/20090208/8f7c5d06/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/luatex/attachments/20090208/8f7c5d06/attachment-0001.html 


More information about the luatex mailing list