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
use Arc;
use JsonSchema;
use ;
/// Font families to try, in order, when a [`Font`](crate::Font) lacks a glyph.
///
/// Set the list on [`Font::fallbacks`](crate::Font::fallbacks). The text system
/// uses these families in order when the primary family cannot supply the needed
/// glyphs. Shaping chooses fonts for clusters, which may contain combining marks
/// or an emoji sequence; it does not choose a font independently for every code
/// point. Names use the same [`TextSystem`](crate::TextSystem) font database as
/// the primary family. See the [text guide](crate::_documentation::guides::text)
/// for loading fonts and working with cluster boundaries.
///
/// # Examples
///
/// ```
/// # use gpui::{FontFallbacks, font};
/// let mut body = font("Lilex");
/// body.fallbacks = Some(FontFallbacks::from_fonts(vec![
/// "Noto Sans Arabic".to_string(),
/// ]));
/// assert_eq!(body.fallbacks.unwrap().fallback_list(), ["Noto Sans Arabic"]);
/// ```
;