Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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

```