views:

15

answers:

0

A composite font family is a collection of FontFamilies. On applying the composite font to a run, appropriate font from its font-collection is applied depending on text.

How can we get which actual font is being used in a run on which a composite font has been applied?

EDIT2: Suppose I have a run

<Run Text="Some text with different unicode characters not available in applied FontFamily" FontFamily="Global User Interface"/>

Now if I check run.FontFamily it returns "Global User Interface", but actual font applied is one from the FontFamily collection of this composite font. So I want to find out which font it is?

EDIT1: One way I can think of is - to find it the way WPF applies a font. For each language, the composite font specifies a set of fonts corresponding to specified range of characters. So we can find each of the character in a run of text, then lookup the font corresponding to this character in the fontfamilymap for current language.

Is this the right way? Are there any cases where it may fail? Is it the only way? Is there any API\straightforward way instead?

Thanks