Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/redth/microsoft.maui.icons
Simple project to extract glyphs from icon fonts and generate consts for their names and unicode values
https://github.com/redth/microsoft.maui.icons
Last synced: 23 days ago
JSON representation
Simple project to extract glyphs from icon fonts and generate consts for their names and unicode values
- Host: GitHub
- URL: https://github.com/redth/microsoft.maui.icons
- Owner: Redth
- License: mit
- Created: 2022-02-04T18:18:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-04T20:18:42.000Z (almost 3 years ago)
- Last Synced: 2024-10-13T15:08:11.610Z (25 days ago)
- Language: C#
- Size: 1.23 MB
- Stars: 23
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microsoft.Maui.Icons
Simple project to extract glyphs from icon fonts and generate consts for their names and unicode values
![image](https://user-images.githubusercontent.com/271950/152597297-9cdec4a4-33a3-4d6a-8c9e-18be20a0c9e9.png)
## Usage in a .NET MAUI App
You can register your fonts in the `ConfigureFonts` method like below:
```csharp
namespace MauiApp18;public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
.ConfigureFonts(fonts =>
{
fonts.AddFont(Microsoft.Maui.Icons.Fluent.Regular.Filename, "FluentRegular");
fonts.AddFont(Microsoft.Maui.Icons.Fluent.Filled.Filename, "FluentFilled");
});return builder.Build();
}
}
```Using the font glyph:
```xml
```
## Excluding Fonts
By default both the `Regular` and `Filled` fonts are included, however since they are larger files, you may only want one. If you want to exclude either one, set the appropriate MSBuild property to `True` in your .csproj file:```xml
True
True```