Skip to content

Commit

Permalink
Merge pull request #46 from Youssef1313/patch-1
Browse files Browse the repository at this point in the history
docs: Update README
  • Loading branch information
jeromelaban authored Jul 10, 2024
2 parents e09e526 + e1f238a commit cbb8387
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ Package|Stable|Preview
-|-|-
Uno.Fonts.Fluent|[![NuGet stable](https://img.shields.io/nuget/v/Uno.Fonts.Fluent?label=stable)](https://www.nuget.org/packages/Uno.Fonts.Fluent)|[![NuGet preview](https://img.shields.io/nuget/vpre/Uno.Fonts.Fluent?label=preview)](https://www.nuget.org/packages/Uno.Fonts.Fluent)
Uno.Fonts.Roboto|[![NuGet stable](https://img.shields.io/nuget/v/Uno.Fonts.Roboto?label=stable)](https://www.nuget.org/packages/Uno.Fonts.Roboto)|[![NuGet preview](https://img.shields.io/nuget/vpre/Uno.Fonts.Roboto?label=preview)](https://www.nuget.org/packages/Uno.Fonts.Roboto)
Uno.Fonts.OpenSans|[![NuGet stable](https://img.shields.io/nuget/v/Uno.Fonts.OpenSans?label=stable)](https://www.nuget.org/packages/Uno.Fonts.OpenSans)|[![NuGet preview](https://img.shields.io/nuget/vpre/Uno.Fonts.OpenSans?label=preview)](https://www.nuget.org/packages/Uno.Fonts.OpenSans)

Repository for NuGet packages that can be added to install fonts for any new or existing Uno application. Uno.Fonts currently offers the following fonts as NuGet packages:

# Uno Fluent UI Assets Font
## Uno Fluent UI Assets Font

An open source icon font for the [Fluent design system](https://www.microsoft.com/design/fluent). Uno FluentUI Assets is intended to be a drop-in replacement for Microsoft's Segoe MDL2 Assets font for use with [Uno Platform](https://platform.uno), WinUI and UWP apps.

## Icon fonts
### Icon fonts

This repository includes two icon fonts:

Expand All @@ -24,7 +25,7 @@ This repository includes two icon fonts:

Both fonts use the same font family name and file names to make it possible to easily swap them in place.

## Icon sources
### Icon sources

Some icons are unique to the font, the other ones come from multiple sources:

Expand All @@ -37,7 +38,7 @@ https://github.com/icons8/line-awesome
Winjs symbols
https://github.com/winjs/winjs/tree/master/src/fonts

## Editing the font file
### Editing the font file

Here are some steps to update the font to add missing icons:

Expand All @@ -51,13 +52,13 @@ Here are some steps to update the font to add missing icons:
- There is no need to save the FontForge format since you can open a font from any of the supported format (You can use this to test if the font as been correctly modified).
- You can ignore the `.g2n` file

# Google Roboto Font
## Google Roboto Font

The recommended, [open source](https://github.com/googlefonts/roboto), font family for Google's visual language [Material Design](https://m3.material.io/). Uno.Fonts.Roboto comes pre-packaged within the [Uno Material](https://github.com/unoplatform/Uno.Themes) and [Uno Material Toolkit](https://github.com/unoplatform/uno.toolkit.ui) libraries.

# Usage Guidelines
## Usage Guidelines

## Installing fonts for new applications
### Installing fonts for new applications

Simply install the desired Uno.Fonts NuGet package into your Uno project's shared class library. You will then be able to reference the font files from your XAML, like so:

Expand All @@ -69,17 +70,21 @@ Simply install the desired Uno.Fonts NuGet package into your Uno project's share

> **NOTE**: If you are using the older versions of the Uno solution templates (with the `.shproj` file) then you will need to install the font NuGet package into each platform's `.csproj`
## Updating existing applications
### Updating existing applications

If you have an existing Uno Platform application using an older version of the font and want to update to the latest, the following steps are needed:

### For Uno.Fonts.Fluent
#### For Uno.Fonts.Fluent

1. Find all files with the name `uno-fluentui-assets.ttf` and replace them with the same file from the updated icon font.
2. Inside of the WebAssembly project find the `Fonts.css` file and replace it with the one provided by updated icon font.

### For Uno.Fonts.Roboto
#### For Uno.Fonts.Roboto

1. Remove all existing Roboto font files from the application (including those under the Assets/ folder for either your shared project or for each specific platform head)
2. Remove references to the font file from `info.plist` if you are targetting iOS/macOS/Catalyst
3. Inside of the WebAssembly project find the `Fonts.css` file and remove any references to the Roboto font, such as `@font-face { font-family: 'Roboto'; ... }`.

## OpenSans Font

[OpenSans](https://fonts.google.com/specimen/Open+Sans) is an open source humanist sans serif typeface designed by Steve Matteson. It's intended to be a replacement for Segoe UI for Uno applications, as Segoe UI isn't available on some platforms. In Uno 5.3, we introduce the ability to change the default font to OpenSans which is served through [Uno.Fonts.OpenSans NuGet package](https://www.nuget.org/packages/Uno.Fonts.OpenSans). For more information, see [Fonts documentation](https://aka.platform.uno/feature-opensans).

0 comments on commit cbb8387

Please sign in to comment.