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

[RC1] - iOS FontImageSource in AppShell TabBar Pixelation #6043

Closed
RichardMarsh opened this issue Apr 13, 2022 · 9 comments · Fixed by #16864
Closed

[RC1] - iOS FontImageSource in AppShell TabBar Pixelation #6043

RichardMarsh opened this issue Apr 13, 2022 · 9 comments · Fixed by #16864
Assignees
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-fonts Custom fonts and Font related API's delighter fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@RichardMarsh
Copy link

RichardMarsh commented Apr 13, 2022

Description

When using FontImageSource as the Icon source in the TabBar, the resulting icons in the TabBar are heavilly pixelated. So much so that it's fairly pointless to use font icons in iOS.

This works great in Android and allows for great flexiblity when using the AppShell.

See below screenshots for reference

iOS Android

Reproduction Repo

Steps to Reproduce

  1. Create a new .NET MAUI app
  2. Add a icon font to the resource folder and include in app start up
  3. Setup app shell to use a TabBar and add several ShellContent entries
  4. Set the ShellConent Icon property to FontImageSource and use glyphs from the font icons added earlier

Version with bug

Release Candidate 1

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15

Did you find any workaround?

No response

Relevant log output

No response

@RichardMarsh RichardMarsh added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 13, 2022
@Eilon Eilon added area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-fonts Custom fonts and Font related API's labels Apr 13, 2022
@kristinx0211 kristinx0211 removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label Apr 14, 2022
@kristinx0211
Copy link

verified works on Android and the above project, but fail in IOS 15.4. the Icon in the TabBar does not show at all.
image

@PureWeen PureWeen added this to the 6.0.300-rc.3 milestone Apr 15, 2022
@v-longmin v-longmin added s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage labels Apr 20, 2022
@v-longmin
Copy link

Verifed repro on ios15.4 with VS 17.3.0 Preview 1.0 [32418.321.main]. Repro project;
Maui.Test-master (1).zip

@davidortinau
Copy link
Contributor

davidortinau commented Apr 22, 2022

iOS seems to need/want color in order to display.

Simulator Screen Shot - iPhone 13 Pro - 2022-04-21 at 19 39 42

<TabBar>
		<ShellContent Icon="{FontImage FontFamily='FontIcon', Glyph='&#xe900;', Color=Black, Size=22}"
        Title="Hello, World!"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" >

		</ShellContent>

		<ShellContent
        Title="Hello, World!"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" >
			<ShellContent.Icon>
				<FontImageSource FontFamily="FontIcon" Glyph="&#xe908;" Size="22" Color="Black" />
			</ShellContent.Icon>

		</ShellContent>

		<ShellContent
        Title="Hello, World!"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" >
			<ShellContent.Icon>
				<FontImageSource FontFamily="FontIcon" Glyph="&#xe958;" Color="Black"/>
			</ShellContent.Icon>

		</ShellContent>
	</TabBar>

And FontAwesome also looks pixelated. See address book icon:

Simulator Screen Shot - iPhone 13 Pro - 2022-04-21 at 19 48 26

@Redth Redth modified the milestones: 6.0.300-rc.3, 6.0.300 Apr 27, 2022
@davidortinau davidortinau added the p/2 Work that is important, but is currently not scheduled for release label May 3, 2022
@samhouts samhouts modified the milestones: 6.0.300, 6.0.300-servicing May 4, 2022
@RichardMarsh
Copy link
Author

RichardMarsh commented Jun 6, 2022

iOS seems to need/want color in order to display.

@davidortinau is this a bug or a feature? Shouldn't these values be pulling through from the app shell's stylesheet value? I think it already does this for png images.

@Redth Redth modified the milestones: 6.0-servicing, Backlog Aug 30, 2022
@ghost
Copy link

ghost commented Aug 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@MGohil
Copy link

MGohil commented Sep 26, 2022

I have tested this in TabbedPage via Font icons as well as png icons. First two tabs uses FontAwesome icons while other two are using png icons from resources.
As you can see, Android behaves pretty good here but iOS icon shows as white icons.
Even if you select, only text color changes but font icon color remains unchanged.
However, if we use png images, the selection color works good in both platforms. The selection applies to icon and text together.
image

To overcome above white icon issue for FontAwesome in iOS, as @davidortinau mentioned, we have to explicitly provide the Color to the icon, which solves this problem but again as you can see in below, the selected tab icon still remains unchanged. Only text color changes.
image

No matter whether we use FontIcon or png both should behave same as it behave in Android.

EDIT:
Color="#64748B" - Works
Color="Gray" - Works
Color="{DynamicResource SelectedTabIconColor}" - Does not work. Color remains white in iOS
This prevents us using Theming.

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 5, 2023
@jinxinjuan jinxinjuan added s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage labels Apr 28, 2023
@jinxinjuan
Copy link

Verified this issue with Visual Studio Enterprise 17.6.0 Preview 5.0. Repro on with sample project Reproduction Repo.
iOS:
image
Android:
image

@RobTF
Copy link

RobTF commented May 18, 2023

Same problem here. Xamarin was fine.

@samhouts samhouts modified the milestones: Backlog, .NET 8 May 25, 2023
@samhouts samhouts removed the p/2 Work that is important, but is currently not scheduled for release label May 25, 2023
@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Jul 10, 2023
@samhouts samhouts modified the milestones: .NET 8, .NET 8 GA Jul 12, 2023
@samhouts samhouts modified the milestones: .NET 8 GA, .NET 8 Aug 9, 2023
@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Aug 16, 2023
@MV10
Copy link

MV10 commented Aug 19, 2023

They look pretty chunky on Windows, too (this is a high-DPI 4K screen).

image

@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Sep 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-fonts Custom fonts and Font related API's delighter fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.