Skip to content

Style packages can bundle fonts via assets.fonts (MOB-476) - #137

Merged
GenericJam merged 1 commit into
masterfrom
feat/MOB-476-style-fonts
Oct 13, 2026
Merged

GenericJam merged 1 commit into
masterfrom
feat/MOB-476-style-fonts

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

priv/mob_style.exs takes an optional assets: %{fonts: [path]} (paths relative to the style package root). Activated styles' fonts join app + plugin fonts in NativeBuild.collect_all_fonts/0 — same dedup and iOS/Android collision checks, bundled to the iOS .app root + UIAppFonts and Android res/font/. A declared file that doesn't exist fails the build naming the style and path. Only :fonts is allowed in a style's assets; style_spec_version stays 1. mix mob.styles lists each style's fonts and flags missing ones.

New public function: MobDev.Style.fonts!/1 (default arg = activated styles). collect_all_fonts/0 is now public @doc false for testing.

Tests: validator shapes; fonts!/1 resolution/failure; a host-project test (Mix.Project.in_project with a path-dep style + mob.exs) proving collect_all_fonts/0 includes the style font and raises on a missing one (fails 0/2 with the wiring removed). Rung 3: throwaway host app with mob_dev path dep — mix mob.styles lists/flags fonts, collect_all_fonts/0 returns app + style font, raises on a missing one.

Pre-commit review: reviewer subagent (Codex rate-limited until 6:25 PM): SHIP, two nitpicks addressed (narrowed fonts!/1 doc, CHANGELOG upgrade note).

Docs: GenericJam/mob docs PR (MOB-476). Linear: https://linear.app/mobframework/issue/MOB-476. No version bump.

priv/mob_style.exs takes an optional assets: %{fonts: [path]}; activated
styles' fonts join app + plugin fonts in collect_all_fonts/0 (same dedup
and collision checks). A declared file that doesn't exist fails the build
naming the style and path. mix mob.styles lists each style's fonts.
New: MobDev.Style.fonts!/1.
@GenericJam
GenericJam merged commit 8d1ab5c into master Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant