21 lines · 635 B · Rust
RawDownload
use std::sync::Arc; use schemars::JsonSchema;use serde::{Deserialize, Serialize}; /// The fallback fonts that can be configured for a given font./// Fallback fonts family names are stored here.#[derive(Default, Clone, Eq, PartialEq, Hash, Debug, Deserialize, Serialize, JsonSchema)]pub struct FontFallbacks(pub Arc<Vec<String>>); impl FontFallbacks {    /// Get the fallback fonts family names    pub fn fallback_list(&self) -> &[String] {        self.0.as_slice()    }     /// Create a font fallback from a list of strings    pub fn from_fonts(fonts: Vec<String>) -> Self {        FontFallbacks(Arc::new(fonts))    }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t