dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

drawing text is not same as in winform with same font and font size? #25703

Closed ljzj2 closed 2 weeks ago

ljzj2 commented 3 weeks ago

I am drawing text using winform and .net android in winform I use graphics and bitmap and in .net android I use Canvas and Paint. the font is Arial and the font size is 12 and in winform I set TextRenderingHint to AntiAliasGridFit and CompositingQuality to SystemDefault and SmoothingMode to None in .net android I also set the antialise.

winform is using .net framework and run in windows 10. .net android is using .net 8 in winform (Zoomed) Image

in .net android (Zoomed): Image

why it is not same? with same font ?

ljzj2 commented 3 weeks ago

any updates?

mattleibow commented 2 weeks ago

Not sure which one you want?

You said you are setting "in .net android I also set the antialise." which means it will antialias and smooth things out. If you want it to no do that, you should set AntiAlias to false.

dotnet-policy-service[bot] commented 2 weeks ago

Hi @ljzj2. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.