Mathjax does not scale properly with font sizes other than the default
Checked for duplicates?
- [x] This issue is not a duplicate
Does it also happen in the desktop version?
- [x] This bug does not occur in the latest version of Anki Desktop
What are the steps to reproduce this bug?
Increased my phone (Samsung)'s font size in the Settings app and viewed Mathjax in Ankidroid. Improper scaling also occurs with font sizes lower than the default. It occurs on both the old and new study screens, and on both the preview screen and the screen displayed when taking a card.
Expected behaviour
What happened: The Mathjax did not scale properly. More specifically, it seems the spacing between it and surrounding elements (both regular text and other Mathjax) was smaller or larger than it should be (for larger font sizes and smaller font sizes respectively). What should have happened: The Mathjax should have scaled properly, with the spacing between it and surrounding elements increasing for larger font sizes and decreasing for smaller ones.
Debug info
AnkiDroid Version = 2.23.3 (9001068fd4819c6fb66cb8239e7166868ab47859)
Backend Version = 0.1.62-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)
Android Version = 14 (SDK 34)
ProductFlavor = full
Device Info = samsung | samsung | a52sxq | a52sxqxx | SM-A528B | qcom
Webview User Agent = Mozilla/5.0 (Linux; Android 14; SM-A528B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.132 Mobile Safari/537.36
ACRA UUID = cdff68cf-dc6b-4a95-820a-59efab81d32b
FSRS = 5.1.0 (Enabled: true)
Crash Reports Enabled = true
(Optional) Anything else you want to share?
Screenshots of the improper scaling
Larger font size:
New study screen:
Preview
Taking card
Old study screen:
Preview
Taking card
Smaller font size:
New study screen, preview
Research
- [x] I have checked the manual and the FAQ and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
reproduced this issue and currently working on it.
@argon2r You still working on this issue?
@Alok-Silswal Yes
@argon2r are you still working on this issue?
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Still occurs in version 2.24.0.
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
I put in some work today under https://github.com/ankidroid/Anki-Android/issues/20776#issuecomment-5701389617 and have a fix.
Closing this as a duplicate
- https://github.com/ankidroid/Anki-Android/issues/20776#issuecomment-5701389617