pub struct Surface {
pub media_rows: HashMap<String, usize>,
pub math_rows: HashMap<String, usize>,
pub inline_pictures: bool,
}Expand description
What the surface a map is built for can paint, and how tall its pictures
came out — the things about a frontend that change the rows core lays
down, gathered from the frontend by crate::Doc and threaded into every
build. The defaults are the plain surface: nothing painted in a line, every
picture a one-row placeholder, which is what every test that passes
Surface::default() gets and what every build got before there was one.
Fields§
§media_rows: HashMap<String, usize>How many visual rows each block image reserves, keyed by its
destination — the frontend’s per-image height, set through
crate::Doc::set_media_rows so [Builder::block_media] can size the
placeholder without core doing any I/O. A destination absent from the
map (or a 0/1 entry) reserves the bare one-row placeholder.
math_rows: HashMap<String, usize>The same for each display formula, keyed by its TeX verbatim (the
MathMark::tex a frontend was handed) — set through
crate::Doc::set_math_rows once the frontend has typeset and
measured the picture.
inline_pictures: boolWhether the surface can paint a picture inside a line of text, so an
inline formula may render to one atom glyph it draws over
(MathInfo). A pixel-laid-out frontend says yes; a terminal cannot
composite an image over one cell, and leaves this off to keep an inline
formula as the code-styled TeX it always showed. Off by default.