Inconsistent behavior when changing font size in LaTeX-formatted text
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Preflight Checklist
- I agree to follow the [Code of Conduct](https://github.com/jgraph/drawio/blob/dev/CODE_OF_CONDUCT.md) that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe the bug
When adjusting the font size of LaTeX-formatted text in draw.io Desktop (version 28.2.8), the subscript text does not consistently scale with the main text.
When increasing the font size, both the main text and subscript enlarge as expected.
However, when decreasing the font size, the subscript text stops shrinking beyond a certain point (probably 10 or 9 px) and remains larger than expected.
To Reproduce
Steps to reproduce the behavior:
-
Open draw.io Desktop.
-
Create a text box.
-
Insert LaTeX text, for example:
$$A_{0}$$ -
Increase the font size — both main and subscript text grow larger.
-
Decrease the font size — the main text continues to shrink, but the subscript text stops shrinking after a certain size (probably 10 or 9).
Expected behavior
Both the main and subscript text should scale consistently when changing the font size, regardless of whether the text size is being increased or decreased.
Screenshots
If necessary, I can provide screenshots showing that the subscript text remains larger after reducing the font size.
- Bigger
- smaller than 10px
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 28.2.8
- draw.io version 28.2.9
Desktop (please complete the following information):
- OS: Windows 11 24H2 26100.6899
- Browser: N/A (Desktop app)
- Browser Version: N/A
I tested on Web version (28.2.9), and it still exists.
- OS: Windows 11 24H2 26100.6899
- Browser: Microsoft Edge
- Browser Version: 141.0.3537.99 (64 bit)
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
- yes
Additional context
None.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in draw.io Desktop and the web version with the LaTeX text $$A_{0}$$, changing the font size above and below 10px. Trace the frontend LaTeX text sizing path and compare the main text with the subscript; done means both scale consistently in both directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, latex
- Domain
- desktop, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100