ankidroid / ankidroid/Anki-Android

Mathjax does not scale properly with font sizes other than the default

Đang mở
#20,327 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Needs Triage
Ngôn ngữ chính
Kotlin
Star
11.8k
Fork
2.9k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
171

Mô tả

### 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

```text
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:
![Image](https://github.com/user-attachments/assets/f7a59db2-cf0a-43b2-918e-3c3bf888a6c8)
Preview

![Image](https://github.com/user-attachments/assets/118fba25-d338-4ac0-97d1-6d6ab2c3a821)
Taking card

Old study screen:

![Image](https://github.com/user-attachments/assets/b77d5dc3-6984-40ba-8f66-2cd89faf8706)
Preview

![Image](https://github.com/user-attachments/assets/35e4b8f2-d88a-4782-9d66-496dc7640866)
Taking card

Smaller font size:
![Image](https://github.com/user-attachments/assets/194b089a-5af9-4d10-a97c-0bc191bad385)
New study screen, preview

### Research

- [x] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/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](https://docs.ankidroid.org/manual.html#betaTesting))

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.