Opened 12 years ago
Closed 12 years ago
#8580 closed bug (wontfix)
Firefox versions return incorrect font-weight
Reported by: | hannasm | Owned by: | hannasm |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | css | Version: | 1.5 |
Keywords: | font-weight, firefox | Cc: | |
Blocked by: | Blocking: |
Description
https://bugzilla.mozilla.org/show_bug.cgi?id=77882
I stumbled upon this while trying to measure text with the canvas object.
A <strong> tag defaults font-weight:bolder which in firefox returns 401. Impact is that anything that needs an accurate font-weight (such as configuring canvas for measuring/rendering text) will fail.
<script src="jquery-1.5.min.js" language="javascript" type="text/javascript"></script> <strong id="myStrong"> test test </strong> <script type="text/javascript"> alert($('#myStrong').css('font-weight')); // 401 </script>
This has been tested in firefox 3.6.10 but, from what i've gathered, affects many more versions of firefox both forward and backward.
I admit this is a bug in firefox but for compatibility jquery should probably know how to handle this scenario and give something closer to the real font-weight.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | set to hannasm |
---|---|
Status: | new → pending |
So is 401 not an accurate value? If not, I agree that this sounds more like something Firefox needs to fix. Have you reported it via Bugzilla? The closest thing I found was this:
comment:3 Changed 12 years ago by
First line of the op has another of the relevant firefox bug reports. It was reported in 2001 so affects *many* versions of the browser. I am just suggesting jquery implement a workaround.
comment:4 Changed 12 years ago by
Component: | unfiled → css |
---|---|
Keywords: | font-weight firefox added |
Priority: | undecided → low |
Resolution: | → wontfix |
Status: | pending → closed |
Thanks for submitting your bug report. We've discussed this with other members of the bug triage team and we feel that this is an issue Mozilla/Firefox need to fix on their end as the behavior for it is undefined. If you do need to workaround, normalization should be possible using cssHooks.
Although there are occasions where it makes sense for jQuery core to implement workarounds to enable expected or consistent behavior, we believe that the above ticket isn't one of those.
Thanks for bringing this to our attention, nevertheless :)
here's a fiddle for convenience
http://jsfiddle.net/H9znQ/1/