Opened 10 years ago

Closed 7 years ago

Last modified 7 years ago

#9025 closed defect (fixed)

gfx splitFontString does not handle valid values for font-size

Reported by: masnare Owned by: Eugene Lazutkin
Priority: high Milestone: 1.8
Component: DojoX GFX Version: 1.1.1
Keywords: gfx splitFontString font Cc:
Blocked By: Blocking:

Description

Given a valid css font-size that is not a number, the gfx splitFontString function will return NaN for the size.

Change History (5)

comment:1 Changed 10 years ago by Adam Peller

Component: GeneralDojoX GFX
Owner: changed from anonymous to Eugene Lazutkin

comment:2 Changed 10 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

Please add a minimalistic test case to see the problem (before the fix) and make sure that the result is right (after the fix).

comment:3 Changed 7 years ago by Patrick Ruzand

Milestone: future1.8
Resolution: fixed
Status: assignedclosed

The problem can be reproduced with the vml or silverlight renderer by *setting* the font returned by splitFontString when the font string contains a non-numeric length (ex: 'small'). In fact, the issue is not in the splitFontString function itself (it parses correctly the font parameters) but happens when such a font is set using the vml or silverlight renderer.

The problem comes from a gfx spec. error: the Font.size property should be a numeric CSS length constant with a unit abbreviation. "12px" or "1.2cm". Reference Manual and API doc updated.

comment:4 Changed 7 years ago by Patrick Ruzand

In [27125]:

initial revision. Add test for splitFontString and makeFontString. refs #9025

comment:5 Changed 7 years ago by Patrick Ruzand

In [27127]:

fix makeFontString doc. refs #9025

Note: See TracTickets for help on using tickets.