ankidroid / ankidroid/Anki-Android

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

Abierto
#20,327 7 comentarios 0 reacciones 0 asignados Ver en GitHub
Needs Triage
Lenguaje dominante
Kotlin
Estrellas
11.8k
Forks
2.9k
Merge medio
2 d 3 h
PR fusionados (30 d)
171

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.