jgraph / jgraph/drawio

Inconsistent behavior when changing font size in LaTeX-formatted text

Open
#5,333 2 comments 0 reactions 0 assignees View on GitHub

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

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:

  1. Open draw.io Desktop.

  2. Create a text box.

  3. Insert LaTeX text, for example:

    $$A_{0}$$
    
  4. Increase the font size — both main and subscript text grow larger.

  5. 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.

  1. Bigger
Image
  1. smaller than 10px
Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.