Instruction set reference
HIPE_OP_TEXT_METRICS
Sent by the display server in response to a HIPE_OP_MEASURE_TEXT instruction. All values are in CSS pixels and may have up to two decimal places.
- location: The element the text was measured in.
- arg[0]: The width of the text (the widest line, if there are several).
- arg[1]: The height of the text: the number of lines multiplied by the element's line height. For a single line, this is the line height itself, which is a convenient way to find out how tall each line of an element is.
- arg[2]: The ascent of the font: the height above the baseline.
- arg[3]: The descent of the font: the depth below the baseline.
Notes
If the text couldn't be measured (for example, the location doesn't refer to an element), all four arguments are empty.
