Frage

In a given word, I want to show one or more Perso-Arabic letters with different formatting (e.g., different color, larger size, etc.). This breaks the combining characters though. In the 3 items below: 1) the word wrapped in a <Span/> and it displays correctly 2) The word's middle letter wrapped in a <Span/> and it displays correctly 3) The word's middle letter wrapped in a <Span/> with it's color changed to red - it does not display correctly

        <TextBlock xml:lang="fa-IR" Language="fa-IR" FontSize="60" FlowDirection="RightToLeft">
            <TextBlock.Inlines>
                <Span Foreground="Yellow">حال</Span>
                ح<Span>ا</Span>ل
                ح<Span Foreground="Red">ا</Span>ل
            </TextBlock.Inlines>
        </TextBlock>

The XAML I'm using is WP8 variant. Is there anyway around this issue to have formatting applied and not break combining characters?

War es hilfreich?

Lösung

I'm afraid if there a complete solution, but as a workaround you can use 2 special Unicode characters. Use ARABIC TATWEEL character after ح and use ZERO WIDTH JOINER character after ا.

In HTML you should try this:

ح&#1600;<strong>ا&#8205;</strong>ل

You can try it here. For more info refer to Iranian national standards ISIRI 6219 and ISIRI 9147. You can also try asking question in Persian Computing Community.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top