Skip to repository content22 lines · 635 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T05:46:17.565Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
font_fallbacks.rs
1use std::sync::Arc;
2
3use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
5
6/// The fallback fonts that can be configured for a given font.
7/// Fallback fonts family names are stored here.
8#[derive(Default, Clone, Eq, PartialEq, Hash, Debug, Deserialize, Serialize, JsonSchema)]
9pub struct FontFallbacks(pub Arc<Vec<String>>);
10
11impl FontFallbacks {
12 /// Get the fallback fonts family names
13 pub fn fallback_list(&self) -> &[String] {
14 self.0.as_slice()
15 }
16
17 /// Create a font fallback from a list of strings
18 pub fn from_fonts(fonts: Vec<String>) -> Self {
19 FontFallbacks(Arc::new(fonts))
20 }
21}
22