#[cfg(any(
feature = "text-shaping",
feature = "fonts-vector-latin",
feature = "fonts-complex",
feature = "fonts-cjk"
))]
#[derive(Clone, Copy)]
pub struct FaceBytes {
pub name: &'static str,
pub bytes: &'static [u8],
}
#[cfg(feature = "fonts-emoji-color")]
#[derive(Clone, Copy)]
pub struct ColorFaceBytes {
pub name: &'static str,
pub bytes: &'static [u8],
}
#[cfg(feature = "fonts-vector-latin")]
mod latin;
#[cfg(feature = "fonts-vector-latin")]
pub use latin::FONT as LATIN;
#[cfg(feature = "fonts-complex")]
mod arabic;
#[cfg(feature = "fonts-complex")]
pub use arabic::FONT as ARABIC;
#[cfg(feature = "fonts-cjk")]
#[cfg_attr(docsrs, doc(cfg(feature = "fonts-cjk")))]
mod cjk;
#[cfg(feature = "fonts-cjk")]
pub use cjk::FONT as CJK;
#[cfg(feature = "fonts-emoji-color")]
mod emoji;
#[cfg(feature = "fonts-emoji-color")]
pub use emoji::FONT as EMOJI;
#[cfg(feature = "fonts-vector-latin")]
const LATIN_FACE: FaceBytes = FaceBytes { name: "Open Sans", bytes: LATIN };
#[cfg(feature = "fonts-complex")]
const ARABIC_FACE: FaceBytes = FaceBytes { name: "Noto Naskh Arabic", bytes: ARABIC };
#[cfg(feature = "fonts-cjk")]
const CJK_FACE: FaceBytes = FaceBytes { name: "Noto Sans SC", bytes: CJK };
#[cfg(feature = "fonts-emoji-color")]
const EMOJI_FACE: ColorFaceBytes = ColorFaceBytes { name: "Noto Color Emoji", bytes: EMOJI };
#[cfg(feature = "fonts-emoji-color")]
pub fn active_color_faces() -> &'static [ColorFaceBytes] {
static SLOTS: [ColorFaceBytes; 1] = [EMOJI_FACE];
&SLOTS
}
#[cfg(any(
feature = "text-shaping",
feature = "fonts-vector-latin",
feature = "fonts-complex",
feature = "fonts-cjk"
))]
pub fn active_faces() -> &'static [FaceBytes] {
#[cfg(all(feature = "fonts-cjk", feature = "fonts-complex", feature = "fonts-vector-latin"))]
static SLOTS: [FaceBytes; 3] = [CJK_FACE, ARABIC_FACE, LATIN_FACE];
#[cfg(all(
feature = "fonts-cjk",
feature = "fonts-complex",
not(feature = "fonts-vector-latin")
))]
static SLOTS: [FaceBytes; 2] = [CJK_FACE, ARABIC_FACE];
#[cfg(all(
feature = "fonts-cjk",
not(feature = "fonts-complex"),
feature = "fonts-vector-latin"
))]
static SLOTS: [FaceBytes; 2] = [CJK_FACE, LATIN_FACE];
#[cfg(all(
feature = "fonts-cjk",
not(feature = "fonts-complex"),
not(feature = "fonts-vector-latin")
))]
static SLOTS: [FaceBytes; 1] = [CJK_FACE];
#[cfg(all(
not(feature = "fonts-cjk"),
feature = "fonts-complex",
feature = "fonts-vector-latin"
))]
static SLOTS: [FaceBytes; 2] = [ARABIC_FACE, LATIN_FACE];
#[cfg(all(
not(feature = "fonts-cjk"),
feature = "fonts-complex",
not(feature = "fonts-vector-latin")
))]
static SLOTS: [FaceBytes; 1] = [ARABIC_FACE];
#[cfg(all(
not(feature = "fonts-cjk"),
not(feature = "fonts-complex"),
feature = "fonts-vector-latin"
))]
static SLOTS: [FaceBytes; 1] = [LATIN_FACE];
#[cfg(not(any(
feature = "fonts-cjk",
feature = "fonts-complex",
feature = "fonts-vector-latin"
)))]
static SLOTS: [FaceBytes; 0] = [];
&SLOTS
}