Open kazo0 opened 3 years ago
https://devblogs.microsoft.com/xamarin/embedded-fonts-xamarin-forms/
Xamarin BlogLearn how to use embedded fonts in Xamarin.Forms - no more platform-specific handling of fonts or adding font files in multiple projects.
Also, provide a mechanism to be able to override the default font provided by the libraries.
This is a important requirement for projects.
@kazo0 Can you explain what one needs to define to override the FontFamily globally in Material? Do we have docs? I'd like to close this
Styles within Uno.Material reference any one of these three FontFamilies: MaterialLightFontFamily, MaterialMediumFontFamily, and MaterialRegularFontFamily. You can set these resources to any FontFamily that you want by using the OverrideSource
property of the MaterialFonts
class that is initialized in the App.xaml. See docs for that here: https://platform.uno/docs/articles/external/uno.themes/doc/material-getting-started.html#change-default-font
So for this issue, we now have a way to override the fonts but we still aren't yet embedding the Roboto/SF Pro fonts into the library. I believe we are currently working on being able to have libraries bring in their own assets to be used within the consuming application, right?
SF Pro for Cupertino Roboto for Material
Figure out how to properly import Font files embedded in the Cupertino/Material libraries into the client apps and properly reference them in things like
TextBlock
styles.Also, provide a mechanism to be able to override the default font provided by the libraries.