#11271 closed defect (invalid)
Calling setFont with incomplete Font definition changes the fontFamily
Reported by: | GMauro | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | DojoX GFX | Version: | 1.5.0b2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Calling setFont to change an aspect of the font other than the fontFamily, has the side effect of changing the fontFamily as well.
In the career_test.html demo of GFX, the text "Ye Olde Vat v3.2" has a different font than the text "Good".
The only difference is that the "Good" text was set to bold. Here are the code snippets creating the two text elements: surface.createText({x: 15, y: 230, text: "Ye Olde Vat v3.2"})
.setFill("black");
...
surface.createText({x: 15, y: 420, text: "Good:"})
.setFont({weight: "bold"}).setFill("green");
Reproduced in Firefox 3.6.3 with the May 28th 2010 nightly build as well as the 1.4.2 release, using Windows XP SP2
Change History (2)
comment:1 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Milestone: | tbd → 1.5 |
---|
Note: See
TracTickets for help on using
tickets.
Yes, it does so, and it is documented. All incomplete properties are taken from the default font/fill/stroke/and so on rather than from the current shape.
It may make sense to introduce a special method, which will update the current value, e.g.,
updateFont()
,updateFill()
, and so on.