[英]XLabs ExtendedLabel change fonts does not work in Xamarin.Forms for UWP app
[英]Xamarin Forms - UWP Fonts
我今天來到這里,還有一次關於同一個問題...我無法找到,在我發現的任何一個帖子或問題的吐口水中,或者我得到的答案......
如何使用UWP使用自定義字體?
我老了教程,老實說,我想我知道這是一個知道是***詩的孩子!
我嘗試了很多,但沒有任何工作......
font = "/Assets/Fonts/Roboto-Light.ttf#Roboto Light";
font = @"\Assets\Fonts\Roboto-Light.ttf#Roboto Light";
font = "./Assets/Fonts/Roboto-Light.ttf#Roboto Light";
font = @".\Assets\Fonts\Roboto-Light.ttf#Roboto Light";
font = "/Fonts/Roboto-Light.ttf#Roboto Light";
font = @"\Fonts\Roboto-Light.ttf#Roboto Light";
這里一個重要的事情是,對於某些字體重量 ,例如Light / Bold等,我們不使用#符號后面的完整字體名稱
例如,如果我們需要將Roboto Light設置為Font,請改用Roboto 。
/Assets/Fonts/Roboto-Light.ttf#Roboto
XAML:
<TextBlock FontFamily="/Assets/Fonts/Roboto-Light.ttf#Roboto" Text="This is a test: Roboto Light FontSize: 10" FontSize="10" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.