daybreak-bilingual-type

Implements Flutter bilingual English/Persian typography with a seven-role TextTheme scale and bundled fonts.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/zakariaf/NearlyStop --skill daybreak-bilingual-type-zakariaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: daybreak-bilingual-type
Source: https://github.com/zakariaf/NearlyStop/tree/main/.claude/skills/daybreak-bilingual-type
Command: npx skills add https://github.com/zakariaf/NearlyStop --skill daybreak-bilingual-type-zakariaf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires intl, shamsi_date, and includes references (resource) components.

What problem does it solve? Flutter apps supporting both English and Persian often ship inconsistent typography: unassigned Material TextTheme slots smuggle in tiny default sizes, CSS em tracking values get pasted as logical pixels, CDN fonts break offline use, and Persian text renders with broken letter-spacing, wrong digits, or unmirrored directional geometry. This Skill encodes the complete Daybreak type system so every text style is correct in both scripts. ## Core Features & Use Cases - Seven-role TextTheme scale: display 72 through caption 14 mapped onto all fifteen Material 3 slots, with em tracking converted to logical pixels at authoring time. - Bilingual font pipeline: Nunito and Vazirmatn bundled via pubspec.yaml with OFL licenses registered through LicenseRegistry, locale-resolved fontFamily/fontFamilyFallback cascades, and google_fonts banned. - Persian rendering rules: a single TextTheme transform applying the +0.14 line-height lift, tracking reset to zero, display stepped 72 to 58, Persian-Indic numerals via intl NumberFormat, and Jalali dates via shamsi_date. - Use Case: When building the Today hero dose screen, apply the display role with FontFeature.tabularFigures() so the 72px numeral does not reflow between 9mg and 10mg, and verify the fa golden shows Persian digits with zero tofu. ## Quick Start Apply the Daybreak typography rules to build the Today hero dose TextStyle with tabular figures and a locale-resolved font cascade for English and Persian.

Frequently Asked Questions about daybreak-bilingual-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Persian font support to a Flutter app?

Bundle Vazirmatn in pubspec.yaml, set fontFamily to Vazirmatn with Nunito as fontFamilyFallback for the fa locale, and apply a TextTheme transform adding +0.14 line height with tracking reset to zero. Never rely on system fonts or google_fonts at runtime.

How do I convert CSS em letter-spacing to Flutter TextStyle?

Flutter letterSpacing is in logical pixels, not em, so multiply the em value by the font size at authoring time. For example, -0.045em at size 72 becomes letterSpacing: -3.24; pasting -0.045 directly gives a value 72 times too small.

Can I use google_fonts in an offline Flutter app?

No, google_fonts ships an HTTP code path that breaks offline guarantees. Declare the font files in pubspec.yaml instead, ship the OFL license text as an asset, and register it via LicenseRegistry before runApp.

How do I display Persian digits and Jalali dates in Flutter?

Use NumberFormat.decimalPattern('fa') from intl for Persian-Indic digits and the shamsi_date package for Jalali conversion. Never hand-roll digit maps, and keep all date arithmetic on UTC epoch, projecting to Jalali only at render.

Why does Persian text break when letter-spacing is applied?

Perso-Arabic is a joined script, so positive tracking snaps the connecting strokes and negative tracking collides diacritics. Tracking must be reset to zero for every Persian role, and uppercase transforms must never be applied since the script has no case.

How do I support 200% text scaling in Flutter without clipping?

Avoid withClampedTextScaling, FittedBox, and ellipsis on critical labels; use Wrap and intrinsic-height layouts that grow, and switch rows to Column based on MediaQuery.textScalerOf(context).scale(17). Verify with a golden matrix across locales, brightness, and text scales 1.0, 1.3, and 2.0.