Canvas getContext("2D") measureText reporing wrong values for fonts using vh css units

Fixed, not yet flighted Issue #7182071

Details

Author
Iasonas Z.
Created
Apr 12, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
12.10240
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Impacting Google Docs caret drawing functionality.

 

When setting the font of a context using vh values, the font has no effect on the measureText method. For example setting the context.font = 'bold 25vh arial’; will have no effect to the output of measureText.
Attached a small js script that reports width of a sample text using no font, vh units and px units for comparison.

Attachments

1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Rick J.”

    Changed Assigned To from “Rick J.” to “Ibrahim O.”

    Changed Assigned To to “Rick J.”

    Changed Assigned To from “Rick J.” to “Christian F.”

    Changed Assigned To from “Christian F.” to “Li-Hsin H.”

    Changed Status to “Confirmed”

    Changed Steps to Reproduce

    Changed Status from “Confirmed” to “In code review”

    Changed Status from “In code review” to “In progress”

    Changed Status from “In progress” to “In code review”

    Changed Status from “In code review” to “In progress”

    Changed Status from “In progress” to “Fixed, not yet flighted”

  • Hello,

    Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 14393 and is available in our latest public stable build.

    Best Wishes,
    The MS Edge Team

You need to sign in to your Microsoft account to add a comment.

Sign in