mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 09:05:51 +00:00
Doc comments for the functions this PR touches
This commit is contained in:
1 parent
ac34105a57
commit
8a479a4922
26 files changed
+95
No files matched your search
@@ -208,6 +208,7 @@ pub struct VMetrics {
|
||||
}
|
||||
|
||||
impl Face {
|
||||
/// The font file bytes, loaded once on first use, or `None` when they cannot be read.
|
||||
fn bytes(&self) -> Option<&[u8]> {
|
||||
self.bytes
|
||||
.get_or_init(|| match &self.info.data {
|
||||
@@ -356,6 +357,7 @@ fn db() -> &'static RwLock<Db> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Adds a face to the database and returns its id.
|
||||
fn push(db: &mut Db, info: FaceInfo) -> FaceId {
|
||||
let id = db.faces.len();
|
||||
db.faces.push(Arc::new(Face { id, info, bytes: OnceLock::new(), file_meta: OnceLock::new(), shaper: OnceLock::new() }));
|
||||
|
||||
Reference in new issue
Block a user