views:

212

answers:

1

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?

+2  A: 

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>
CraigD
From the MSDN ref: "The Silverlight text elements can use the following Latin fonts *if available on the local computer*.". So can I assume PCs/Macs are going to have Wingdings installed? Not really stressing over it - low tech solution: display an 'x'. :)
russau
This posthttp://www.wynapse.com/Silverlight/Tutor/Fonts_In_December_2007_CTP.aspxsuggests Webdings (as opposed to Wingdings) is more likely to be available cross-platform (see edit in answer)
CraigD