Bugzilla – Bug 20109
Permitted values for pressure
Last modified: 2013-02-07 02:08:47 UTC
Opening on behalf of François Remy.
Current spec text defines pressure as a normalized value where 0 is no pressure and 1 is maximum pressure. This creates a potential issue where more capable devices are penalized such to work on the same range of values, meaning a user may have to apply more pressure on one device to achieve the same result as another.
12/4 telecon resolution:
-For devices that do not support pressure (e.g. a mouse), pressure must be 1 when in the active buttons state and 0 otherwise.
-Pressure will remain normalized (e.g. in the range of [0,1]) (no change)
We took a second look at this issue and have a suggested tweak to the change we made . In most pen enabled applications, mouse generally emulates half the maximum pressure of pen. As an example, Paint provides half the stroke width when using a mouse as compared with maximum pressure of a pen. This is generally in line with guidance Microsoft has given for pen drawing for quite some time: minimum pressure should be 50% stroke width, half-way pressure is 100% (e.g. what mouse should produce), and maximum pressure is 150% .
Given that, I reactivated this bug for us to consider making the value 0.5 rather than 1 when the device is in the active buttons state.
Similar to the pressure issue, the spec currently allows implementations to provide a width/height that’s “typical of the device type” when the hardware doesn’t support contact geometry . But it doesn’t require it. IE10 does not simulate width/height for devices that do not provide geometry. But I think we’d probably make IE do so in our next release, similar to emulating pressure. I’d like to consider making the MAY (optional) a SHOULD (recommended) in the spec for emulating width/height. I think the emulation we’d use in IE is:
Mouse, Pen – 1x1 width
Touch without hw support for geometry – about 40x40 CSS pixels ***
This “smart default” approach should also apply to tiltX/tiltY, but the existing default of 0 seems appropriate for those (e.g. the stylus is normal to the screen).
*** Adjusted for zoom. 40 CSS pixels is approximately 11mm, the average width of a touch contact .
Making change as suggested per 2/5 telecon.