Skip to content

Commit

Permalink
Merge pull request #57 from Shallowmallow/TextMeasurer
Browse files Browse the repository at this point in the history
Use correct font computed style for div text measurer
  • Loading branch information
ianharrigan authored Oct 20, 2024
2 parents e8b223f + 9ecce8d commit 4739ec1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions haxe/ui/backend/TextInputImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ class TextInputImpl extends TextDisplayImpl {
div.style.lineHeight = element.style.lineHeight;
if ((element is TextAreaElement)) {
div.style.wordBreak = element.style.wordBreak;
div.style.font = Browser.window.getComputedStyle(element).font;
}
if (autoWidth == false) {
div.style.width = (_width > 0) ? '${HtmlUtils.px(_width)}' : "";
Expand Down

0 comments on commit 4739ec1

Please sign in to comment.