`measureTemporaryTextBlock` depending `font size`

I’m working with TextEditor.js and measureTemporaryTextBlock and want to get height of temporaryTextBlock with different font sizes but this function return the same height with all kind of font sizes

How to get measuredBounds depending on font size?

TextEditingTool | GoJS API is working with a “temporary TextBlock” whose properties are copied from the original TextEditingTool.textBlock, so you are not modifying the TextBlock that is being measured. And since you are passing the same string on each call, you are getting the same results.

You need to be modifying the TextBlock that TextEditingTool.measureTemporaryTextBlock returns, and then call measureTemporaryTextBlock again.

I hope you can understand that we don’t want to be modifying the original TextBlock arbitrarily, which is why measurement during the operation of the TextEditingTool has to work on a copy.

Thank you.