Segoe MDL2 Assets字体家族中的丢失图标 [英] Missing icon in Segoe MDL2 Assets font family

查看:65
本文介绍了Segoe MDL2 Assets字体家族中的丢失图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个AppBarButton,其中icon属性是FontIcon,但是我要使用的特定图标不起作用;它显示为矩形.

我正在用C#创建一个UWP应用,并且试图从Segoe MDL2 Assets字体中创建一个带有QR Code(Unicode点ED14)图标的按钮,但是当我在图标的Glyph属性中输入图标标识符时FontIcon元素仅显示占位符矩形,就好像未安装字体一样.我在应用程序中使用的所有其他图标都可以正常工作,但是此图标没有出现.

我确保复制了工作按钮并仅更改了图标代码,但是它不起作用.我还尝试过将已知工作图标的代码放入损坏的按钮中,并且效果很好.本页

有人知道如何使图标显示在Microsoft文档中吗?它看起来应该像这张图片.(抱歉,信誉不足,无法正确发布图像.)

解决方案

会出现此问题,表明您的系统版本可能较低.

Segoe MDL2 Assets 是系统图标字体,随着系统更新而改变.QR Code图标稍后出现,在较低版本的系统中不可用.

因此,请尝试更新您的系统.或将字体复制到较高版本的系统上,然后将其安装在较低版本的系统上

最诚挚的问候.

I'm trying to create an AppBarButton where the icon property is a FontIcon but the specific icon I want to use is not working; it is showing as a rectangle.

I'm creating a UWP app in C# and I'm trying to create a button with the QR Code (Unicode point ED14) icon from the Segoe MDL2 Assets font but when I enter the icon identifier into the Glyph property of the FontIcon element it simply shows the placeholder rectangle as if the font is not installed. Every other icon I have used in my app works just fine, but this one is not appearing.

I have made sure to copy working buttons and simply change the icon code but it does not work. I have also tried placing the code for known working icons into the broken button and that works just fine. There seems to be something wrong with the QR Code icon found on this page https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font.

Button in question:

<AppBarButton Label="QR Codes" Click="{x:Bind NewExhibitionAsync}">
    <AppBarButton.Icon>
        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xED14;"/>
    </AppBarButton.Icon>
</AppBarButton>

Full CommandBar:

<CommandBar>
    <AppBarButton Label="Open...">
        <AppBarButton.Icon>
            <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE8E5;"/>
        </AppBarButton.Icon>
    </AppBarButton>
    <AppBarButton Icon="Save" Label="Save" />
    <AppBarButton Label="Save as...">
        <AppBarButton.Icon>
            <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE792;"/>
        </AppBarButton.Icon>
    </AppBarButton>

    <AppBarSeparator/>

    <AppBarButton Icon="Add" Label="New Exhibition" Click="{x:Bind NewExhibitionAsync}"/>
    <AppBarButton Label="QR Codes" Click="{x:Bind NewExhibitionAsync}">
        <AppBarButton.Icon>
            <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xED14;"/>
        </AppBarButton.Icon>
    </AppBarButton>
    <AppBarButton Label="Set Primary Photo" Click="{x:Bind SetStarred}" IsEnabled="{x:Bind SetStarredEnabled, Mode=OneWay}">
        <AppBarButton.Icon>
            <SymbolIcon Symbol="SolidStar" Foreground="Goldenrod"/>
        </AppBarButton.Icon>
    </AppBarButton>

    <AppBarSeparator/>

    <AppBarButton Icon="Delete" Label="Delete" Click="{x:Bind DeleteArtefactAsync}" IsEnabled="{x:Bind DeleteArtefactEnabled, Mode=OneWay}"/>
    <AppBarButton Icon="Edit" Label="Edit" Click="{x:Bind EditArtefactAsync}" IsEnabled="{x:Bind EditArtefactEnabled, Mode=OneWay}"/>
</CommandBar>

The above code currently displays as per the following image when placed into a CommandBar.

Does anyone have any idea how to get the icon to display as shown on the Microsoft docs? It should look like this image. (Sorry, not enough reputation to post images properly.)

解决方案

This problem occurs, indicating that your system version may be lower.

Segoe MDL2 Assets is the system icon font, which changes with the system update. The QR Code icon appears later, and it is not available in the lower version system.

So please try to update your system. Or copy the font on a higher version of the system and install it on a lower version system

Best regards.

这篇关于Segoe MDL2 Assets字体家族中的丢失图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆