Silverlight 2 和 XML 字符实体
Wingdings 字符集和等效的 Unicode 字符 告诉我我不应该在网页。 按照 Silverlight 2 中的相同建议,我正在尝试这样的操作:
<TextBlock FontSize="20" FontFamily="Arial" Foreground="Red">✗</TextBlock>
✗
在 HTML 中为您提供了一个很酷的 ✗。
在 Silverlight 中,我得到了方形破碎的字符图标。 XAML 中允许使用“数字字符映射”。 为什么不是这个角色? Silverlight 2 中允许的 Unicode 范围是否有一些官方参考?
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">✗</TextBlock>
✗
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是一个编码问题,我在 IE 和 FF 中看到了“方形/未知字形”,甚至在您的帖子中(以及 Silverlight 中)。
此Ballot-X(您的角色)的浏览器测试页无法在我的电脑上正确显示。
这个 本地字体列表(非常棒)显示我的电脑上没有可以显示它的字体。
我猜测它可以在您的浏览器中工作,因为字体替换而不是Arial中实际存在的字符...也许您可以将HTML复制到Word中(带格式)看看Word应用什么字体?
最好的选择可能是使用字符映射表来选择显式出现在 Silverlight 在所有平台上支持的字体 - 您可以尝试这样做以获得一个漂亮的小“x”(实际上是只是 乘以 Comic Sans 中的)
或 Webdings 显然可以在PC 和 Mac 均适用,并给出了稍微粗一点的“x”
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)
OR Webdings is apparently available on both PC and Mac and gives a slightly chunkier 'x'