verticalOriginOf method

({double x, double y}) verticalOriginOf(
  1. int code
)

Position vector in em from the glyph's horizontal origin to its vertical origin (ยง9.7.4.3): x centres the glyph on the column (half its horizontal advance) and y comes from /W2 or /DW2. Only meaningful when isVertical.

Implementation

({double x, double y}) verticalOriginOf(int code) {
  final v = _w2[code];
  return (
    x: v != null ? v[1] / 1000 : widthOf(code) / 2,
    y: (v != null ? v[2] : _dw2[0]) / 1000,
  );
}