use-font-metrics Examples

  1. Quickstart - measure string width and display the result (source)
  2. Horizontal Metrics - measure string width and chop off advanceWidth (source)
  3. Vertical Metrics - display font baseline and xHeight (source)
  4. Fit Text Height - Resize the browser window to see text capHeight sizing to DOM element height (source)