pub fn natural_display_size_pt(path: &Path) -> Option<(f64, f64)>Expand description
The figure’s TRUE natural (typeset) size in TeX pt, for the VECTOR formats
whose intrinsic size is a real physical dimension: a PDF page box, an EPS/PS
%%BoundingBox (both bp), or an SVG’s lengths/viewBox. None for raster
formats — a pixel count is not a physical size without a DPI — and when the
geometry can’t be recovered.
This is deliberately NOT image_graphicx_sizer’s cached_width: that runs
EPS/raster dimensions through a device-DPI round-trip (×72.27/DPI), which is
right for the box model’s device-pixel sizing but wrong as a physical length.
This function is the size a browser should reproduce, used for the
font-relative (em) sizing of natural-size figure inclusions (#562).
Extension-gated so each format is read exactly once; pure Rust, no external
tool.