Question

Wingdings character set and equivalent Unicode characters tells me I shouldn't use wingding characters on a webpage. Following the same advice in Silverlight 2 I'm attempting something like this:

 <TextBlock FontSize="20" FontFamily="Arial" Foreground="Red">&#10007;</TextBlock>

&#10007; gives you a cool ✗ in HTML.

In Silverlight I'm getting the square broken character icon. "Numeric character mappings" are allowed in XAML. Why not this character? Is there some official reference of the allowed Unicode ranges in Silverlight 2?

Was it helpful?

Solution

Not sure that this is an encoding issue, I see a 'square/unknown glyph' in IE and FF even in your post (as well as in Silverlight).

This browser test page for Ballot-X (your char) cannot display it correctly on my PC.

This local font list (which is awesome) shows I do not have a single font on my PC that can display it.

I'm guessing it works in your browsers due to font substitution rather than the character actually existing in Arial... perhaps you could copy your HTML into Word (with formatting) and see what font Word applies?

Best bet is probably to use Character Map to pick glyphs that explicitly appear in the subset of fonts supported by Silverlight on all platforms - you might try this to get a nice little 'x' (which is actually just multiply in Comic Sans)

<TextBlock FontFamily="Comic Sans MS" FontSize="14">&#0215;</TextBlock>

OR Webdings is apparently available on both PC and Mac and gives a slightly chunkier 'x'

<TextBlock FontFamily="Webdings" FontSize="14">&#0114;</TextBlock>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top