* @param v the value to convert
* @param d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH
* @param ctx the context
*/
protected static float pixelsToEms(float v, short d, Context ctx) {
CSSPrimitiveValue fontSize = ctx.getFontSize();
short type = fontSize.getPrimitiveType();
return v / cssToUserSpace(fontSize.getFloatValue(type),
type,
d,
ctx);
}