Closed Bug 1011187 Opened 7 years ago Closed 7 years ago
HTML Canvas does not render small-caps font variants
Setting the canvas font to a small-caps variant does not produce a small-caps effect. var can = document.getElementById('canvas1'); var ctx = can.getContext('2d'); ctx.font = "italic small-caps bold 22px verdana, tahoma, serif"; ctx.fillText("Test One Two Three", 50, 50); Simple example: http://jsfiddle.net/vrS2B/ Other browsers: Chrome: Works iOS Safari: Works IE11: Does not work
Confirmed 32.0a1 (2014-05-15), win 7 x64
Status: UNCONFIRMED → NEW
Ever confirmed: true
Fixing this within the current architecture used for small-caps in HTML is hard. But if we move the implementation of small-caps from layout (nsTextFrame.cpp and nsTextRunTransformations.cpp) over into gfx, making it an attribute of gfxFontStyle that is implemented at rendering time, it'll become trivial. I have an experimental patch for this refactoring. I'll file a separate bug for that, and tidy up the patch for review; then we can make this dependent on it. (See also bug 935739 re XUL text.)
This issue is fixed by bug 1015603; here's a reftest for it.
Attachment #8428720 - Flags: review?(roc)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8428720 - Flags: review?(roc) → review+
Target Milestone: --- → mozilla32
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Confirmed working in nightly. You guys are seriously the best in terms of bug response of all the browsers I deal with. By miles and miles. Thank you so much.
You need to log in before you can comment on or make changes to this bug.