help text
This commit is contained in:
+4
-4
@@ -6,7 +6,7 @@
|
||||
//! and joined after them: by the time anything is drawn, every label is shaped
|
||||
//! and its glyphs are already in the cache, and painting one costs ~0.1ms.
|
||||
//!
|
||||
//! Sizes here are physical pixels — the caller scales logical units first,
|
||||
//! Sizes here are physical pixels - the caller scales logical units first,
|
||||
//! because the chrome buffer it paints into is physical too.
|
||||
|
||||
use std::thread::{self, JoinHandle};
|
||||
@@ -54,7 +54,7 @@ const MONO_CANDIDATES: &[&str] = &[
|
||||
|
||||
/// Load the smallest font database that can render `family`.
|
||||
///
|
||||
/// `FontSystem::new()` scans every system font, which costs ~37ms — most of the
|
||||
/// `FontSystem::new()` scans every system font, which costs ~37ms - most of the
|
||||
/// startup budget. A user's own font directories are tiny by comparison, so try
|
||||
/// those first and only pay for the full scan when the family really isn't there
|
||||
/// (which is also what makes an unknown family fall back gracefully). The
|
||||
@@ -87,7 +87,7 @@ fn has_family(db: &fontdb::Database, family: &str) -> bool {
|
||||
/// Turn the generic default into a real family name.
|
||||
///
|
||||
/// cosmic-text's own generic resolves through fontdb's built-in preference
|
||||
/// ("FreeMono"), which is usually absent and then lands on an arbitrary face — so
|
||||
/// ("FreeMono"), which is usually absent and then lands on an arbitrary face - so
|
||||
/// ask fontconfig instead, since that is what the rest of the desktop uses. A
|
||||
/// named family passes through untouched; if it turns out to be missing,
|
||||
/// cosmic-text falls back on its own.
|
||||
@@ -145,7 +145,7 @@ fn build(texts: Vec<String>, family: String, font_px: f32, line_h: f32, box_w: f
|
||||
}
|
||||
}
|
||||
|
||||
/// Shorten `text` until it fits in `box_w`, ending with an ellipsis — window
|
||||
/// Shorten `text` until it fits in `box_w`, ending with an ellipsis - window
|
||||
/// titles are arbitrarily long, and rofi ellipsised them too.
|
||||
fn ellipsize(
|
||||
fs: &mut FontSystem,
|
||||
|
||||
Reference in New Issue
Block a user