2022-11-06 23:48:12 +11:00
|
|
|
//! Binary assets for use with `nih_plug_vizia`. These fonts first need to be registered using their
|
|
|
|
//! associated registration function.
|
2022-03-18 10:22:58 +11:00
|
|
|
|
2022-06-18 09:59:53 +10:00
|
|
|
use vizia::prelude::*;
|
2022-03-18 10:22:58 +11:00
|
|
|
|
|
|
|
// This module provides a re-export and simple font wrappers around the re-exported fonts.
|
|
|
|
pub use nih_plug_assets::*;
|
|
|
|
|
2022-11-06 23:48:12 +11:00
|
|
|
/// The font name for Noto Sans Regular, needs to be registered using
|
|
|
|
/// [`register_noto_sans_regular()`] first.
|
|
|
|
pub const NOTO_SANS_REGULAR: &str = "Noto Sans Regular";
|
|
|
|
/// The font name for Noto Sans Regular Italic, needs to be registered using
|
|
|
|
/// [`register_noto_sans_regular_italic()`] first.
|
|
|
|
pub const NOTO_SANS_REGULAR_ITALIC: &str = "Noto Sans Regular Italic";
|
|
|
|
/// The font name for Noto Sans Thin, needs to be registered using [`register_noto_sans_thin()`]
|
|
|
|
/// first.
|
|
|
|
pub const NOTO_SANS_THIN: &str = "Noto Sans Thin";
|
|
|
|
/// The font name for Noto Sans Thin Italic, needs to be registered using
|
|
|
|
/// [`register_noto_sans_thin_italic()`] first.
|
|
|
|
pub const NOTO_SANS_THIN_ITALIC: &str = "Noto Sans Thin Italic";
|
|
|
|
/// The font name for Noto Sans Light, needs to be registered using [`register_noto_sans_light()`]
|
|
|
|
/// first.
|
|
|
|
pub const NOTO_SANS_LIGHT: &str = "Noto Sans Light";
|
|
|
|
/// The font name for Noto Sans Light Italic, needs to be registered using
|
|
|
|
/// [`register_noto_sans_light_italic()`] first.
|
|
|
|
pub const NOTO_SANS_LIGHT_ITALIC: &str = "Noto Sans Light Italic";
|
|
|
|
/// The font name for Noto Sans Bold, needs to be registered using [`register_noto_sans_bold()`]
|
|
|
|
/// first.
|
2023-01-18 06:27:02 +11:00
|
|
|
// NOTE: I'd expect this to be an alias for Noto Sans Regular but this is what cosmic-text thinks
|
|
|
|
// the font is called
|
|
|
|
pub const NOTO_SANS_BOLD: &str = "Noto Sans";
|
2022-11-06 23:48:12 +11:00
|
|
|
/// The font name for Noto Sans Bold Italic, needs to be registered using
|
|
|
|
/// [`register_noto_sans_bold_italic()`] first.
|
2023-01-18 06:38:40 +11:00
|
|
|
pub const NOTO_SANS_BOLD_ITALIC: &str = "Noto Sans Italic";
|
2022-11-06 23:48:12 +11:00
|
|
|
|
|
|
|
pub fn register_noto_sans_regular(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_REGULAR]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_regular_italic(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_REGULAR_ITALIC]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_thin(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_THIN]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_thin_italic(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_THIN_ITALIC]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_light(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_LIGHT]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_light_italic(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_LIGHT_ITALIC]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_bold(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_BOLD]);
|
2022-11-06 23:48:12 +11:00
|
|
|
}
|
|
|
|
pub fn register_noto_sans_bold_italic(cx: &mut Context) {
|
2023-01-13 04:49:55 +11:00
|
|
|
cx.add_fonts_mem(&[fonts::NOTO_SANS_BOLD_ITALIC]);
|
2022-03-18 10:22:58 +11:00
|
|
|
}
|