Repository navigation
Style packages can bundle fonts via assets.fonts (MOB-476) - #137
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
priv/mob_style.exstakes an optionalassets: %{fonts: [path]}(paths relative to the style package root). Activated styles' fonts join app + plugin fonts inNativeBuild.collect_all_fonts/0— same dedup and iOS/Android collision checks, bundled to the iOS.approot +UIAppFontsand Androidres/font/. A declared file that doesn't exist fails the build naming the style and path. Only:fontsis allowed in a style'sassets;style_spec_versionstays 1.mix mob.styleslists each style's fonts and flags missing ones.New public function:
MobDev.Style.fonts!/1(default arg = activated styles).collect_all_fonts/0is now public@doc falsefor testing.Tests: validator shapes;
fonts!/1resolution/failure; a host-project test (Mix.Project.in_projectwith a path-dep style +mob.exs) provingcollect_all_fonts/0includes 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.styleslists/flags fonts,collect_all_fonts/0returns 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.