-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Font size issues between iOS and macOS #229
Comments
Hi @brendand Keeping a standard font size has been problematic, and it should be improved. I'm struggling with finding time for this project at the moment, but will hopefully have time later in H1. Until then, I'm happy to take a look at anything the community comes up with. |
So it's not just me holding it wrong? I'm pretty sure that Apple handles this sort of thing properly in apps like Notes and Pages between platforms. Would be great to know what tricks they use. I thought the |
I'm not sure. I agree that |
It happens with a regular UITextView. Not just RichTextKit. I filed a feedback on it in 2022 with a sample app, but never heard back from Apple on that. It was feedback FB11274733. You can try it out yourself. Attaching sample app. |
How do you get the text in a RichTextEditor look approximately the same size as text with the same content on macOS?
I've been looking into the UITextView's
usesStandardTextScaling
property to try and figure this out. Apple states:but when I enable that on the RichTextView, it messes up the insertion pointer and doesn't display the text across the entire width of the UITextView like it should. Plus worse of all, the insertion pointer and selection blocks go all wonky.
I don't have a Mac Catalyst app. It's AppKit. I also have an iOS version. They display the same NSAttributedString data, but on iOS, the text renders too small. But if you change the text size on iOS to be more readable, then on macOS it's too large.
Basically how do you use RichTextKit to display the same size text on both macOS and iOS?
Here's two screenshots. Both showing the same paragraph selected.
The first one where the selection looks proper and matches the text is with
usesStandardTextScaling = false
. But the text is small and should render larger (without changing the point size of the text) so it visually matches what's seen on the Mac.The second one is with
usesStandardTextScaling = true
and you can see the text isn't rendering larger as it should AND the selection area is offset from the content. It seems like the text needs to be shifted to the right and zoomed in a bit to make it fit the blue selection area.How do other people handle text size issues between macOS and iOS apps?
The text was updated successfully, but these errors were encountered: