ワンクリックで
widget-fonts
Dartsnut widget font catalog usage, font copy conventions, and safe font loading rules.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Dartsnut widget font catalog usage, font copy conventions, and safe font loading rules.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Dartsnut asset manifest, loader-helper, placeholder, and apply-mode workflow for art-bearing entities.
Root conf.json schema, defaults, size rules, preview handling, and reload requirements for Dartsnut projects.
Dartsnut workspace scaffold rules, just-in-time skill loading, file constraints, and emulator verification workflow.
Dartsnut display and framebuffer mapping rules for panels, physical screens, layout, clipping, and fonts.
Legacy Dartsnut runtime index that routes to the granular pydartsnut, conf, display, and asset skills.
Pixel-perfect compact UI guidance for console-style Dartsnut games and widgets.
| name | widget-fonts |
| description | Dartsnut widget font catalog usage, font copy conventions, and safe font loading rules. |
| license | MIT |
Load before copy_asset_file for fonts or when main.py loads widget fonts.
Use availableWidgetFonts from host/workspace metadata: each entry has file (basename) and glyphWidth / glyphHeight (nominal glyph size in pixels; from the WxH in names like 10x20.pil, or manifest bounds for fonts without that pattern).
read_file on font_manifest.json or repo paths outside the widget workspace.file basename from the catalog (no invented *-541a345d suffixes in code paths).copy_asset_file → ./fonts/ in the widget directory (tool strips trailing -<8 hex> from filenames)..pil and matching .pbm when both exist in the catalog.Path(__file__).parent / "fonts" in main.py.from pathlib import Path
from PIL import ImageFont
FONT_DIR = Path(__file__).parent / "fonts"
def load_widget_font(name: str, size: int | None = None):
font_path = FONT_DIR / name
if font_path.suffix.lower() == ".pil":
return ImageFont.load(str(font_path))
if size is None:
size = 12
return ImageFont.truetype(str(font_path), size)
If a font is missing from the catalog, pick the closest size match and note it briefly in the final reply.