Skip to content

Commit

Permalink
fix(doc): updating font doc is easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
alextrepa committed Aug 25, 2020
1 parent f851956 commit 37bcfef
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions doc/articles/uno-fluent-assets.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
---
title: Uno Fluent UI assets
author: alextrepa
description: adding new multiplateform font
---

# Uno Fluent UI assets
Uno has a new multiplateform font. The new font must be added to app build before the change.

> [!IMPORTANT] \
> **IMPORTANT** \
This is a breaking change on most platform the font needs to be changed or most control will display incorrectly.

Uno has a new multiplatform font. The new font must be added manually to each platform to access the new symbols.

## Font files
The font is in this repository https://github.com/unoplatform/uno.fonts
The font is in this repository https://github.com/unoplatform/uno.fonts. The necessary files can be downloaded here: https://github.com/unoplatform/uno.fonts/tree/master/webfonts

## Changes

| Device family | Description |
| -- | -- |
| iOS & macOS | Once Uno has been updated, it will start looking for a font named symbols (Not necessarily the name of the file). For this font to be available it needs to be in the resource folder. ![image](Assets/font-ios.png) ![image](Assets/font-macos.png) The `info.plist` should also be updated for both platforms, replacing winjs-symbols.ttf by uno-fluentui-assets.ttf|
| Android | Once Uno has been updated, it will start looking for a font file named uno-fluentui-assets.ttf in its assets folder: ![image](Assets/font-android.png) |
| WebAssembly | A wasm build won't break after the update but to access the new symbols the file Font.css should be chnaged. The font is passed as a base64 file. ![image](Assets/font-wasm.png) |
### iOS & macOS
---
The `info.plist` file should be updated for both platforms, replacing the string `winjs-symbols.ttf` with `uno-fluentui-assets.ttf` in the file.

On iOS and macOS, Uno looks for a font named 'Symbols' (A font's name is not necessarily the name of the file). For this font to be available, the font file needs to be placed in the `Resources/Fonts` folder. The old `winjs-symbols.ttf` file can safely be deleted. \ \
\
![image](Assets/font-ios.png) \
\
![image](Assets/font-macos.png)
\
Open the `.csproj` file (`YourApp.iOS.csproj` or `YourApp.macOS.csproj`). Replace the string `winjs-symbols.ttf` with `uno-fluentui-assets.ttf`.

### Android
---
Once Uno has been updated, it will start looking for a font file named uno-fluentui-assets.ttf in the assets folder: \
\
![image](Assets/font-droid.png)
\
Open the `.csproj` (`YourApp.Droid.csproj`). Replace the string `winjs-symbols.ttf` with `uno-fluentui-assets.ttf`.
### WebAssembly
---
WASM won't break after the update, but to access the new symbols the file Font.css should be changed. The font is passed as a base64 string: \ \
\
![image](Assets/font-wasm.png)
\
Simply replace the contents of Font.css in your app with those of the `Font.css` linked to above.

## Limitations
On iOS and macOS the indeterminate state for a check box is not the right color.
## Known issues
On iOS and macOS the indeterminate state for a CheckBox is not the right color.


## Related Topics
- [#3011](https://github.com/unoplatform/uno/issues/3011)
- [3011](https://github.com/unoplatform/uno/issues/3011)
- [967](https://github.com/unoplatform/uno/issues/967)

0 comments on commit 37bcfef

Please sign in to comment.