Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skia] Custom font is not working #17283

Closed
ArchieCoder opened this issue Jun 25, 2024 · 7 comments · Fixed by #17301
Closed

[skia] Custom font is not working #17283

ArchieCoder opened this issue Jun 25, 2024 · 7 comments · Fixed by #17301
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working kind/documentation project/documentation 📖 Categorizes an issue or PR as relevant to documentation triage/untriaged Indicates an issue requires triaging or verification

Comments

@ArchieCoder
Copy link
Contributor

Current behavior

Embedding a custom font like the free Ready to Party Font https://www.dafont.com/ready-to-party.font does not work.

Expected behavior

Custom font should work.

How to reproduce it (as minimally and precisely as possible)

Deploy the app with WinUI and skia (Windows or Mac)

UnoApp1.zip

Workaround

No response

Works on UWP/WinUI

None

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

No response

Affected platforms

Skia (WPF), Skia (macOS)

IDE

No response

IDE version

Latest VS

Relevant plugins

No response

Anything else we need to know?

No response

@ArchieCoder ArchieCoder added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Jun 25, 2024
@ArchieCoder
Copy link
Contributor Author

This is probably affecting #16931

@Youssef1313 Youssef1313 self-assigned this Jun 25, 2024
@Youssef1313
Copy link
Member

The ms-appx path in repro is not correct, causing a fallback to default font. It should be ms-appx:///Assets/Fonts/party.ttf#Ready to Party instead of ms-appx:///UnoApp1/Assets/Fonts/party.ttf#Ready to Party. Doing that change, the font is rendered correctly both on Skia and WinAppSDK

@Youssef1313
Copy link
Member

Closing as this seems to be working as expected. Let me know please if you still have additional problems

@Youssef1313 Youssef1313 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
@ArchieCoder
Copy link
Contributor Author

I followed the instructions which mentioned the app name https://platform.uno/docs/articles/features/custom-fonts.html#adding-a-custom-font-in-the-app-assets-folder

image

@Youssef1313
Copy link
Member

Reopening as a doc issue

@Youssef1313 Youssef1313 reopened this Jun 25, 2024
@Youssef1313 Youssef1313 added project/documentation 📖 Categorizes an issue or PR as relevant to documentation kind/documentation labels Jun 25, 2024
@Youssef1313 Youssef1313 removed their assignment Jun 25, 2024
@luckypong
Copy link

If I describe the project I am currently using:

Single Project is ms-appx:///Assets
Library or Shared Projects are ms-appx:///[MyApp]/Assets

After migrating to Single Project in Shared Projects, it was confirmed that the existing font could not be set, and the operation was confirmed after changing ms-appx:///Assets.

@jeromelaban
Copy link
Member

@ArchieCoder here's the updated doc. #17301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working kind/documentation project/documentation 📖 Categorizes an issue or PR as relevant to documentation triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants