Monospaced Font Character Width / Draw.io Console API

300 views
Skip to first unread message

Henning Dieterichs

unread,
May 4, 2016, 4:49:54 PM5/4/16
to draw.io
Hello!

I want to create a diagram that shows a syntax tree above a source text. To do that, I need every character in the source text to have a certain width, preferrable a width that works well with the grid.
Sadly the following happens when I try to arrange the font size to the grid:

The font is both Courier New, in the first text block with a size of 16pt, in the second 17pt. As there are not font sizes in between, it seems I am out of luck.
What can I do to match the size of a character with the size of these small boxes the grid is made of?

My second approach would be to create a text element for each character so that I can arrange the characters individually. However I don't want to do that manually.
Is there a way to do this via the browsers dev console?

Thanks in advance!

Gaudenz Alder

unread,
May 5, 2016, 1:33:24 PM5/5/16
to draw.io
Thanks for the report. We'll add support for text sizes with decimal points (eg. 16.5pt) in the next release.

Gaudenz Alder

unread,
May 6, 2016, 1:53:14 PM5/6/16
to draw.io
Fixed in 5.4.4.4.
Reply all
Reply to author
Forward
0 new messages