【发布时间】:2020-04-28 11:08:23
【问题描述】:
默认表情符号在我的 Xamarin.Forms 应用程序中运行良好,而且色彩丰富。当我添加Twitter color fonts 时,它变为黑白(黑白)。这个Procedure我关注了。
初始化
[assembly: ExportFont( "TwitterColorEmoji.ttf", Alias = "TwitterColorEmoji" )]
这是xaml中的示例代码
<!-- This is not working -->
<Label x:Name="emojilbl" Text="\U+1F1E9" Margin="20,0,0,0"></Label>
<Label
x:Name="emoji2lbl"
Text="🇦🇨"
Margin="20,0,0,0"
TextColor="#5EE514"
FontSize="40"
FontFamily="TwitterColorEmoji"></Label>
<!-- This is not working -->
<Image BackgroundColor="Black">
<Image.Source>
<FontImageSource
FontFamily="TwitterColorEmoji"
Glyph="🇦🇨"
Size="40"
>
</FontImageSource>
</Image.Source>
</Image>
<!-- This is working fine with default font -->
<Label Text="🇦🇨" Margin="20,0,0,0" FontSize="40"/>
为什么表情符号不显示自己的颜色。 感谢您的帮助。
【问题讨论】:
标签: xaml xamarin xamarin.forms fonts emoji