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

[WinUI] Image with FontImageSource is not displayed properly when using a custom font in an unpackaged app #19608

Closed
marchev-prgs opened this issue Dec 28, 2023 · 3 comments
Labels
area-fonts Custom fonts and Font related API's area-image Image loading, sources, caching partner Issue or Request from a partner team platform/windows 🪟 t/bug Something isn't working

Comments

@marchev-prgs
Copy link

marchev-prgs commented Dec 28, 2023

Description

I have an Image with a FontImageSource, and the Glyph is not displayed properly when a custom font is used:

<Image x:Name="i3" WidthRequest="100" HeightRequest="100" Background="#33EE22AA">
<Image.Source>
<FontImageSource Glyph="&#xe85b;" FontFamily="my_custom_font" />

Please see the repro project.
Note that this happens only in an unpackaged winui app:
None

Here is an image of what is shown:
fontimagesource_unpack_img

And here is an image of what is expected:
fontimagesource_pack_img

Steps to Reproduce

  1. Get the repo from the link
  2. Go to folder Maui\FontImageSourceNotDisplayedInUnpackagedWinUIApp
  3. Run the sample application in WinUI

Expected Behavior
The Image should display the glyph from the custom font, it should look like a little house.

Actual Behavior
The Image does not display the glyph properly, just some rectangle is drawn.

Link to public reproduction project repository

https://github.com/telerik/ms-samples/tree/main/Maui/FontImageSourceNotDisplayedInUnpackagedWinUIApp

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

I did not find a workaround.

Relevant log output

No response

@marchev-prgs marchev-prgs added the t/bug Something isn't working label Dec 28, 2023
@marchev-prgs
Copy link
Author

This issue is most likely the one Matthew mentions here.

@Eilon Eilon added the area-image Image loading, sources, caching label Dec 29, 2023
@BrunoVersa
Copy link

I have the same trouble

@PureWeen PureWeen added partner Issue or Request from a partner team platform/windows 🪟 area-fonts Custom fonts and Font related API's labels Jan 3, 2024
@rmarinho
Copy link
Member

Duplicate of #15802

@rmarinho rmarinho marked this as a duplicate of #15802 Jan 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-fonts Custom fonts and Font related API's area-image Image loading, sources, caching partner Issue or Request from a partner team platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants