1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Packing rasterized glyph coverage into a texture, and placing the result.
//!
//! This crate takes coverage bitmaps and answers where each one sits. It does
//! not produce them: turning an outline into coverage needs a font parser, and
//! that is out of scope here -- bring `swash` or `ttf-parser` and hand the
//! coverage over. Shaping and layout are out of scope for the same reason;
//! bring `cosmic-text` or `parley`. The boundary is what lets the atlas be
//! tested with no font anywhere in the tree, against bitmaps whose contents
//! are known exactly.
//!
//! Named here because this header claimed them and they would each change what
//! a caller has to do: subpixel positioning, signed-distance-field coverage
//! above a threshold size, and color glyphs drawn as image quads are **not
//! implemented**. Nor is paging -- a full atlas is repacked and then doubled,
//! which [`atlas`] explains and which was chosen over pages because a page
//! boundary splits a glyph run into more than one draw.
pub use ;
/// One glyph, placed.
///
/// The position is the glyph's top-left corner in user space, and the size is
/// what it covers there. Both come from the caller: shaping decides where
/// glyphs go and this does not shape. Keeping the destination separate from the
/// atlas rectangle is what lets a glyph be drawn at a size other than the one
/// it was rasterized at, which a caller doing so knowingly may want.