Silverlight 2 和 XML 字符实体

发布于 2024-07-27 23:56:41 字数 564 浏览 2 评论 0原文

Wingdings 字符集和等效的 Unicode 字符 告诉我我不应该在网页。 按照 Silverlight 2 中的相同建议,我正在尝试这样的操作:

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

&#10007; 在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏雨凉 2024-08-03 23:56:41

不确定这是一个编码问题,我在 IE 和 FF 中看到了“方形/未知字形”,甚至在您的帖子中(以及 Silverlight 中)。

Ballot-X(您的角色)的浏览器测试页无法在我的电脑上正确显示。

这个 本地字体列表(非常棒)显示我的电脑上没有可以显示它的字体。

猜测它可以在您的浏览器中工作,因为字体替换而不是Arial中实际存在的字符...也许您可以将HTML复制到Word中(带格式)看看Word应用什么字体?

最好的选择可能是使用字符映射表来选择显式出现在 Silverlight 在所有平台上支持的字体 - 您可以尝试这样做以获得一个漂亮的小“x”(实际上是只是 乘以 Comic Sans 中的

<TextBlock FontFamily="Comic Sans MS" FontSize="14">×</TextBlock>

或 Webdings 显然可以在PC 和 Mac 均适用,并给出了稍微粗一点的“x”

<TextBlock FontFamily="Webdings" FontSize="14">r</TextBlock>

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">×</TextBlock>

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

<TextBlock FontFamily="Webdings" FontSize="14">r</TextBlock>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文