New Perspectives On Web Design

(C. Jardin) #1

CHAPTER 9 The Next Steps for Web Typography


@media only screen and (min-device-pixel-ratio: 1.5)
and (orientation: portrait) {
@font-face {
font-family: '++graded font';
...
}
}

Reading Distance, Revisited
We currently assume reading distances are based on the devices’ form fac-
tors. Device manufacturers decide on the reference pixel, making numer-
ous assumptions as to how the device will be used at the uniform reading
distance. That is, we only read from a smartphone when it is held with
the palm facing towards the face, read from a tablet when held with both
hands, and always sit exactly 70cm away from our desktop screen.
We need something better, a way to detect the physical relationship
between the user and the device and to readjust typography accordingly.
We already have the technology to measure reading distances so we can
readily detect and calculate how far the object is from the device with sen-
sors that are already available in devices.
Firefox OS and Firefox for Android both support the Proximity API^86 ,
which detects how close the device is to any other physical object, by
accessing the proximity sensor. In Firefox implementations, it currently
works at distances of up to 10cm, but if it could be expanded to return
accurate values for distances within arm’s reach, we could use that value
to increase or decrease the letter size and adjust paragraph spacing accord-
ingly. Working with proximity API is straightforward. The DeviceProx-
imityEvent interface provides information about the distance between
the device and a nearby object, while the UserProximityEvent currently
returns a boolean value if the user is close to the device.

86 https://hacks.mozilla.org/2013/06/the-proximity-api/
Free download pdf