Do you need font-size to be dynamic, and adjust according to another factor such as element height? The following demo shows you how to achieve that. Taking advantage of the calc() function, users can easily adjust font-size of an element according to its height.
Use the resize tool to adjust element size, and observe how the font-size changes dynamically.
The source code of this demo is available as part of the JointJS+ commercial license. Don't have a license yet? Start a trial and use the source code of this and many other demos for free, with no obligations, for 30 days.