Universe

eeaabb

Visual debug helpers for Typst to extract element axis-aligned bounding boxes (AABB).

Exports

Parameters:

  • unit conversion function for lengths.
    • default: length.pt. Available options: length.{cm,mm,inches,pt}
  • precision decimal places (default 3).

Example

#import "@preview/eeaabb:0.1.0": ccaabb, eeaabb

// Explicit calls
#eeaabb(block[Hello World])\
#ccaabb(text(size: 2em)[Kerning?])

// Calling via a show rule
#[
  #set text(top-edge: "bounds")
  #show: eeaabb
  #show: ccaabb
  Asogi Genshin\
  亜双義\u{3000}玄真
]

// Calling via a show rule, this time with some extra touches
#[
  #set text(top-edge: "bounds")
  #show: eeaabb.with(unit: length.mm, precision: 4)
  #show: ccaabb.with(unit: length.mm, precision: 4)
  Asogi Kazuma\
  亜双義\u{3000}一真
]
#import "@preview/eeaabb:0.1.0": debug-font
#show: debug-font

// test your font here
The quick brown fox jumps over a lazy dog.