Skip to content

"FontImageSource not center-aligned inside Image control in .NET MAUI" #30004

Open
@Santhosh-SF4792

Description

@Santhosh-SF4792

When using a FontImageSource inside an Image control in .NET MAUI, the icon glyph is not vertically or horizontally centered within its bounding box. This misalignment is especially noticeable when compared to rendering the same glyph inside a Label using FontFamily, where it aligns correctly with HorizontalTextAlignment and VerticalTextAlignment.

It’s unclear whether this is intended behavior or a platform-specific limitation, but it creates inconsistent UI appearance and requires workarounds. If this is by design, it should be clearly documented. Otherwise, this appears to be a bug or missing feature in layout handling.

Steps to Reproduce:

Create a FontImageSource in XAML

Use it inside an Image control with fixed width/height (e.g., 32x32).

Compare it visually with the same glyph rendered in a Label using the same font.

Observe alignment differences

Expected Behavior:
The FontImageSource glyph should be centered within the Image bounds (like Label).

Actual Behavior:
The glyph rendered via FontImageSource appears misaligned — often off-centered.

Tested Platforms:

✅ Windows

.NET MAUI Version: (9.0.0)

Screen Shots:

Image

Sample :

SfCoreSimpleSample.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions