3 Replies Latest reply on Jan 13, 2011 2:18 PM by ozDiGennaro

    Right-to-left text in TextLayout framework - kerning of diacritical marks?

    ozDiGennaro Level 1

      I have started a right-to-left language using TextFlow and RichEditableText.

      I have trouble with kerning.

       

      When using Hebrew with diacritical marks (and these are common), the kerning is not correct.  Each diacritical glyph is made in a space after the character.  (This did work with TextField).  I tried setting Kerning ON, but that did not help.

       

      typical code:

                 
                  var format:TextLayoutFormat;
                  textFlow = TextFlowUtil.importFromXML(textFlowXML, WhiteSpaceCollapse.PRESERVE);
                 
                  format = new TextLayoutFormat();
                  format.color = 0x442222;
                  format.kerning = flash.text.engine.Kerning.ON;
                 
                  textFlow.format = format;

       

                  richText.textFlow = textFlow;

       

      The XML (start):

       

        <TextFlow direction="rtl">
          <div color="#442222" fontSize="20" paragraphSpaceAfter="0" textAlign="right" fontFamily="DavidD" >
            <p name="p0"><span>פרק א</span></p>
            <p>     
            <span>
      א  בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ