Merge origin/main into the memory leak fix
CI / test (push) Successful in 5m49s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hj5m35Lj6Rt9vwwLGZ
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-26 17:11:01 -08:00
commit 15b7c3f0e3
4 files changed
+21 -7

No files matched your search

+11 -6
View File
@@ -24,7 +24,7 @@ pub fn missing_font_message(env_path : String) -> String {
"CHANDRA_EMOJI_FONT=" + env_path + " can't be read as a bitmap (CBDT) colour emoji font. " +
"Unset it to use Chandra's own Noto Color Emoji."
} else {
"Chandra's emoji font is missing: " + font_path + " (Noto Color Emoji, bitmap edition). " +
"Chandra's emoji font is missing or unreadable: " + font_path + " (Noto Color Emoji, bitmap edition). " +
"Run `just install` (or `just emoji-font` in a checkout), then press Super+. again."
}
}
@@ -439,12 +439,13 @@ pub fn EmojiSource::new() -> EmojiSource {
{ state: None, images: {} }
}
///| Open the font: CHANDRA_EMOJI_FONT when set, else the first of `font_paths` that parses.
/// The path, or what to tell the user. Logged once.
///| Open the font: CHANDRA_EMOJI_FONT when set, else `font_path`. The path, or what to tell the
/// user. A failure is tried again on the next call (so fixing the file needs no new session) and
/// logged only when it changes.
pub fn EmojiSource::font(self : EmojiSource) -> Result[String, String] {
let st = match self.state {
Some(s) => s
None => {
Some(Ok(s)) => Ok(s)
previous => {
let env = @sys.getenv("CHANDRA_EMOJI_FONT")
let p = if env.length() > 0 { env } else { font_path }
let data = @sys.read_file_bytes(p)
@@ -458,7 +459,11 @@ pub fn EmojiSource::font(self : EmojiSource) -> Result[String, String] {
}
match found {
Ok((p, f)) => @sys.log("emoji: " + p + " (" + f.ppem.to_string() + " px pictures)")
Err(m) => @sys.log("emoji: " + m)
Err(m) =>
match previous {
Some(Err(old)) if old == m => ()
_ => @sys.log("emoji: " + m)
}
}
self.state = Some(found)
found