neiam
/icon-studio
public · Issues · Pulls · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
Drop debugging scaffolding and ignore __pycache__
f232944 · gmorell · 2026-09-22 03:48
Message
{commit_body(@commit)}
Files changed
modified
.gitignore
+2
−0
@@ -1 +1,3 @@
| 1 | 1 | /target |
| 2 | +__pycache__/ | |
| 3 | +*.pyc |
deleted
examples/fgprobe.rs
+0
−15
@@ -1,15 +0,0 @@
| 1 | −use icon_studio::render; | |
| 2 | −use icon_studio::spec::{Foreground, IconSpec}; | |
| 3 | −fn main() { | |
| 4 | − let spec = IconSpec { foreground: Foreground::Icon('\u{e899}'), ..Default::default() }; | |
| 5 | − let fg = render::render_foreground(&spec, 432); | |
| 6 | − // Composite over white so transparency is visible as white, ink as dark. | |
| 7 | − let mut out = tiny_skia::Pixmap::new(432, 432).unwrap(); | |
| 8 | − out.fill(tiny_skia::Color::WHITE); | |
| 9 | − out.draw_pixmap(0, 0, fg.as_ref(), &tiny_skia::PixmapPaint::default(), | |
| 10 | − tiny_skia::Transform::identity(), None); | |
| 11 | − out.save_png("/tmp/claude-1000/fg_probe.png").unwrap(); | |
| 12 | − let opaque = fg.pixels().iter().filter(|p| p.alpha() > 0).count(); | |
| 13 | − let full = fg.pixels().iter().filter(|p| p.alpha() == 255).count(); | |
| 14 | − println!("alpha>0: {opaque} alpha==255: {full} of {}", 432*432); | |
| 15 | −} |
deleted
examples/glyphprobe.rs
+0
−18
@@ -1,18 +0,0 @@
| 1 | −use ab_glyph::{Font, FontRef, ScaleFont}; | |
| 2 | −fn main() { | |
| 3 | − for (label, bytes) in [ | |
| 4 | − ("outlined", &include_bytes!("../assets/MaterialSymbolsRounded-Regular.ttf")[..]), | |
| 5 | − ("filled", &include_bytes!("../assets/MaterialSymbolsRounded_Filled-Regular.ttf")[..]), | |
| 6 | − ] { | |
| 7 | − let f = FontRef::try_from_slice(bytes).unwrap(); | |
| 8 | − let sf = f.as_scaled(100.0); | |
| 9 | − for ch in ['\u{e899}', '\u{e85d}', '\u{e179}'] { | |
| 10 | − let id = f.glyph_id(ch); | |
| 11 | − let g = id.with_scale(100.0); | |
| 12 | − let ob = f.outline_glyph(g); | |
| 13 | − let b = ob.as_ref().map(|o| o.px_bounds()); | |
| 14 | − println!("{label} U+{:04X} id={:?} adv={:.1} bounds={:?}", | |
| 15 | − ch as u32, id.0, sf.h_advance(id), b); | |
| 16 | − } | |
| 17 | − } | |
| 18 | −} |
deleted
examples/pxprobe.rs
+0
−16
@@ -1,16 +0,0 @@
| 1 | −use icon_studio::render; | |
| 2 | −use icon_studio::spec::{Foreground, IconSpec}; | |
| 3 | −fn main() { | |
| 4 | − let spec = IconSpec { foreground: Foreground::Icon('\u{e899}'), ..Default::default() }; | |
| 5 | − let fg = render::render_foreground(&spec, 432); | |
| 6 | − let w = fg.width() as usize; | |
| 7 | − let px = fg.pixels(); | |
| 8 | − // Sample across the lock body (a solid region) and its edge. | |
| 9 | − for y in [230usize, 250, 270] { | |
| 10 | − let row: Vec<String> = (200..=216).step_by(4) | |
| 11 | − .map(|x| { let p = px[y*w+x]; format!("({:02X},{:02X},{:02X},{:02X})", p.red(), p.green(), p.blue(), p.alpha()) }) | |
| 12 | − .collect(); | |
| 13 | − println!("y={y}: {}", row.join(" ")); | |
| 14 | − } | |
| 15 | − println!("expected ink = (0D,2A,2C,FF)"); | |
| 16 | −} |
modified
?
+0
−0
Binary file — not rendered.
Parents: 38cca4c