Repository navigation
feat: add font_src to TextShape, UiText, UiDropdown and UiInput - #489
Merged
Merged
Conversation
Test this pull request
|
robtfm
force-pushed
the
feat/font-src-main
branch
from
September 16, 2026 12:03
7ad88dd to
1a04a71
Compare
This was referenced Sep 17, 2026
2 of 5 tasks
popuz
approved these changes
Oct 5, 2026
Scenes can only pick from the six built-in `font` enum values. `font_src` lets a scene name its own face: a ttf file in the scene content, or a Google Fonts family name. `font` remains the fallback when the source can't be resolved, so unset changes nothing. Field numbers match the ones already carried on `experimental-bevy`, so the wire format is identical on both branches: PBUiText skips 7-8 and PBUiInput skips 14-15 (multi_line, clear_on_submit), which stay reserved for the experimental fields that will land on main separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
robtfm
force-pushed
the
feat/font-src-main
branch
from
October 5, 2026 14:16
784a1b8 to
3518fb2
Compare
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.
currently scenes can only pick from the six built-in
fontenum values. addsfont_srcto let a scene name its own face.Adds
optional string font_srctoPBTextShape,PBUiText,PBUiDropdownandPBUiInput. The value resolves as:fontenum, which stays the fallback whenever the source can't be resolved.Unset changes nothing, so existing scenes are unaffected.
Field numbering
The field numbers match the ones already carried on
experimental-bevy, so the wire format is identical on both branches and no renumber is needed when they converge. That leaves deliberate gaps on main:PBUiTextskips 7-8 and takesfont_src = 9.PBUiInputskips 14-15 and takesfont_src = 16. 14 and 15 aremulti_lineandclear_on_submitonexperimental-bevy, and stay reserved for them to land on main separately.PBTextShape(22) andPBUiDropdown(13) are the next free numbers on both branches.Implementation
Implemented in the bevy explorer (decentraland/bevy-explorer#1263), and unity explorer (decentraland/unity-explorer#10118), both resolve scene files through the content map and Google Fonts families through the Fontsource API (CORS-open, static per-weight ttfs — the Google Fonts CSS API can't serve a browser client a ttf).
🤖 Generated with Claude Code