与WPF的Unicode字符替换不一致

与WPF的Unicode字符替换不一致,wpf,unicode,Wpf,Unicode,我的WPF应用程序似乎正在用其他字符替换某些Unicode字符 通过这个简单的例子: <Window x:Class="WPFUnicodeFail.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.mic

我的WPF应用程序似乎正在用其他字符替换某些Unicode字符

通过这个简单的例子:

<Window x:Class="WPFUnicodeFail.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:WPFUnicodeFail"
    mc:Ignorable="d"
    Title="MainWindow" Height="350" Width="525" FontFamily="Segoe UI" FontSize="40">

<StackPanel Orientation="Horizontal">
    <Label>◀</Label>
    <Label>&#x25C0;</Label>
    <Label>◄</Label>
    <Label>&#x25C4;</Label>
    <Label>▲</Label>
</StackPanel>

◀
◀;
◄
◄;
▲

我得到这个结果:

如果我将字体切换为Arial,我会得到以下结果:

所有这些都没有多大意义,因为前两个标签应该是,后两个标签应该是。三角形应该是等边三角形,而指针应该更平。使用Segoe UI,三角形将透明地替换为指针。使用Arial,更糟糕的是,它们被切换了

尝试将字符本身包含在源代码和
&#x
代码中,可以得到与上图相同的结果

在Word 2016中,我在Segoe UI中尝试了三个不同的字符,得到了正确的结果(尽管缩放不一致,尽管字体大小相同,但这是一个不同的问题):


为什么会发生这种情况?如何使用不同的字体获得一致的结果?或者至少,如何获得Segoe UI和其他字体的三角形,这些字体似乎会将其更改为指针?

如果您检查Windows字符映射使用的字体(开始>程序>附件>系统工具>字符映射),您会注意到Segoe UI字体缺少
U+25C0
字符,Arial也是如此。我想,这是特定于实现的,当必须显示字体中缺少的字符时,系统如何处理这种情况。如果选择Segoe UI符号字体,则可以看到WPF应用程序正确显示的字符。也许微软Word可以自动做到这一点

如果要确保所有符号都以不同的字体正确显示,您可能应该使用字符映射工具检查这些字体