簡體   English   中英

默認 colors 未顯示在 fonts Xamarin.Z64502425319129881C3Z83CAE8 中

[英]Default colors is not showing in fonts Xamarin.Forms

默認表情符號在我的 Xamarin.Forms 應用程序中運行良好,而且色彩豐富。 當我添加Twitter 顏色 fonts 時,它變成黑白(黑白)。 我遵循的這個程序

初始化

[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="&#x1F1E6;&#x1F1E8;" 
    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="&#x1F1E6;&#x1F1E8;" 
            Size="40" 
            > 
        </FontImageSource>
    </Image.Source>
</Image> 

<!-- This is working fine with default font -->
<Label Text="&#x1F1E6;&#x1F1E8;"  Margin="20,0,0,0" FontSize="40"/>

在此處輸入圖像描述

為什么表情符號不顯示自己的顏色。 感謝高級的幫助。

通過將“嵌入式資源”更改為“資源”選項解決了問題。

在此處輸入圖像描述 在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM