Install any skill in seconds. Free to start, no credit card required.
Get Started Free →CRITICAL: Use for Makepad font and text rendering. Triggers on: makepad font, makepad text, makepad glyph, makepad typography, font atlas, text layout, font family, font size, text shaping, makepad 字体, makepad 文字, makepad 排版, makepad 字形
.claude/skills/sickn33-makepad-font/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 63% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 63% | 0% |
> Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19 > > Check for updates: https://crates.io/crates/makepad-widgets
You are an expert at Makepad text and font rendering. Help users by:
Refer to the local files for detailed documentation:
./references/font-system.md - Font module structure and APIsBefore answering questions, Claude MUST:
/sync-crate-skills makepad --force 更新文档"draw/src/text/
├── font.rs # Font handle and metrics
├── font_atlas.rs # GPU texture atlas for glyphs
├── font_face.rs # Font face data
├── font_family.rs # Font family management
├── fonts.rs # Built-in fonts
├── glyph_outline.rs # Glyph vector outlines
├── glyph_raster_image.rs # Rasterized glyph images
├── layouter.rs # Text layout engine
├── rasterizer.rs # Glyph rasterization
├── sdfer.rs # Signed distance field generator
├── selection.rs # Text selection/cursor
├── shaper.rs # Text shaping (harfbuzz)rust<Label> { text: "Hello World" draw_text: { text_style: { font: { path: dep("crate://self/resources/fonts/MyFont.ttf") } font_size: 16.0 line_spacing: 1.5 letter_spacing: 0.0 } color: #FFFFFF } }
rust<Label> { text: "Styled Text" draw_text: { text_style: <THEME_FONT_REGULAR> { font_size: (THEME_FONT_SIZE_P) } } }
rustlive_design! { // Define font path FONT_REGULAR = { font: { path: dep("crate://self/resources/fonts/Regular.ttf") } } FONT_BOLD = { font: { path: dep("crate://self/resources/fonts/Bold.ttf") } } // Use in widget <Label> { draw_text: { text_style: <FONT_REGULAR> { font_size: 14.0 } } } }
rustpub struct Layouter { loader: Loader, cache_size: usize, cached_params: VecDeque<OwnedLayoutParams>, cached_results: HashMap<OwnedLayoutParams, Rc<LaidoutText>>, } impl Layouter { pub fn new(settings: Settings) -> Self; pub fn rasterizer(&self) -> &Rc<RefCell<Rasterizer>>; pub fn is_font_family_known(&self, id: FontFamilyId) -> bool; pub fn define_font_family(&mut self, id: FontFamilyId, definition: FontFamilyDefinition); pub fn define_font(&mut self, id: FontId, definition: FontDefinition); pub fn get_or_layout(&mut self, params: impl LayoutParams) -> Rc<LaidoutText>; }
rustpub struct OwnedLayoutParams { pub text: Substr, pub spans: Box<[Span]>, pub options: LayoutOptions, } pub struct Span { pub style: Style, pub len: usize, } pub struct Style { pub font_family_id: FontFamilyId, pub font_size_in_pts: f32, pub color: Option<Color>, } pub struct LayoutOptions { pub max_width_in_lpxs: Option<f32>, // Max width for wrapping pub wrap: bool, // Enable word wrap pub first_row_indent_in_lpxs: f32, // First line indent }
rustpub struct Settings { pub loader: loader::Settings, pub cache_size: usize, // Default: 4096 } pub struct rasterizer::Settings { pub sdfer: sdfer::Settings { padding: 4, // SDF padding radius: 8.0, // SDF radius cutoff: 0.25, // SDF cutoff }, pub grayscale_atlas_size: Size::new(4096, 4096), pub color_atlas_size: Size::new(2048, 2048), }
rust<View> { // Label is a simple text widget <Label> { text: "Simple Label" draw_text: { color: #FFFFFF text_style: { font_size: 14.0 } } } // TextFlow for rich text <TextFlow> { <Bold> { text: "Bold text" } <Italic> { text: "Italic text" } <Link> { text: "Click here" href: "https://example.com" } } }
| Property | Type | Description | |----------|------|-------------| | text | String | Text content | | font | Font | Font resource | | font_size | f64 | Size in points | | line_spacing | f64 | Line height multiplier | | letter_spacing | f64 | Character spacing | | color | Vec4 | Text color | | brightness | f64 | Text brightness | | curve | f64 | Text curve effect |
dep("crate://...") for embedded font resourcesUse this skill when tackling tasks related to its primary domain or functionality as described above.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 11,699 | 7,394 | -37% | 1 | 1 | 0% | 2,366 | 3,267 | +38% | 0 | 0 | — |
case-02 | fail→pass | 14,584 | 9,833 | -33% | 1 | 1 | 0% | 2,953 | 3,571 | +21% | 0 | 0 | — |
case-03 | fail→pass | 15,069 | 12,098 | -20% | 1 | 1 | 0% | 2,897 | 3,904 | +35% | 0 | 0 | — |
case-04 | fail→pass | 13,317 | 9,161 | -31% | 1 | 1 | 0% | 2,200 | 3,711 | +69% | 0 | 0 | — |
case-05 | fail→pass | 12,000 | 9,466 | -21% | 1 | 1 | 0% | 2,013 | 3,291 | +63% | 0 | 0 | — |
case-06 | fail→pass | 12,029 | 6,354 | -47% | 1 | 1 | 0% | 1,778 | 2,906 | +63% | 0 | 0 | — |
case-07 | fail→pass | 16,037 | 7,648 | -52% | 1 | 1 | 0% | 2,887 | 3,264 | +13% | 0 | 0 | — |
case-08 | fail→pass | 10,655 | 4,583 | -57% | 1 | 1 | 0% | 1,585 | 2,499 | +58% | 0 | 0 | — |
case-09 | pass→pass | 25,902 | 3,555 | -86% | 1 | 1 | 0% | 2,752 | 2,285 | -17% | 0 | 0 | — |
case-10 | pass→pass | 6,815 | 3,375 | -50% | 1 | 1 | 0% | 1,037 | 2,298 | +122% | 0 | 0 | — |
case-11 | fail→fail | 17,377 | 2,922 | -83% | 1 | 1 | 0% | 2,544 | 2,067 | -19% | 0 | 0 | — |
case-12 | pass→pass | 12,155 | 8,758 | -28% | 1 | 1 | 0% | 2,154 | 3,216 | +49% | 0 | 0 | — |
case-13 | fail→pass | 11,566 | 4,772 | -59% | 1 | 1 | 0% | 2,003 | 2,625 | +31% | 0 | 0 | — |
case-14 | fail→pass | 8,726 | 5,173 | -41% | 1 | 1 | 0% | 1,718 | 2,752 | +60% | 0 | 0 | — |
case-15 | fail→pass | 13,323 | 4,791 | -64% | 1 | 1 | 0% | 2,406 | 2,752 | +14% | 0 | 0 | — |
case-16 | pass→pass | 6,819 | 2,874 | -58% | 1 | 1 | 0% | 1,260 | 2,304 | +83% | 0 | 0 | — |
case-17 | fail→pass | 10,128 | 4,199 | -59% | 1 | 1 | 0% | 1,657 | 2,570 | +55% | 0 | 0 | — |
case-18 | fail→pass | 16,208 | 13,296 | -18% | 1 | 1 | 0% | 2,496 | 4,157 | +67% | 0 | 0 | — |
case-19 | pass→pass | 7,694 | 3,027 | -61% | 1 | 1 | 0% | 1,387 | 2,203 | +59% | 0 | 0 | — |
case-20 | pass→pass | 15,807 | 14,995 | -5% | 1 | 1 | 0% | 2,886 | 4,621 | +60% | 0 | 0 | — |
case-21 | pass→pass | 9,732 | 9,575 | -2% | 1 | 1 | 0% | 2,005 | 3,685 | +84% | 0 | 0 | — |
case-22 | pass→pass | 11,605 | 12,655 | +9% | 1 | 1 | 0% | 2,231 | 4,391 | +97% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.