BUG with Control._GetFontOffset when using font size as !important

Following the discussion on that thread TextBlock Line Spacing - #13 by gabrielheming

I have found a bug that gives different results when the font size is processed as priority (!important) in the DOM.

The solution is replacing the line below

text.style.font = font;

With this:

text.setAttribute('style', `font: ${font} !important`);

Any other attempt that I tried hadn’t worked. Though, it will be isolated inside that method with now external break changes.

1 Like

Issue #9863

1 Like