Skip to content

The Android screens in the brass 1.5.1 fonts (2.30.0) - #307

Merged
compot-dev merged 2 commits into
v2from
feat/brass-fonts-android-306
Nov 24, 2026
Merged

compot-dev merged 2 commits into
v2from
feat/brass-fonts-android-306

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Closes #306. The brand's fonts on the Android screens, as the debug page got them in 2.29.1 (#304).

  • assets/fonts/: BrassSerif-Bold.ttf, BrassMono-Regular.ttf, BrassMono-Bold.ttf next to the page's .woff2, byte for byte the brand's files (brass 1.5.1); one OFL.txt. BrassFontsTest checks all seven files against the brand's SHA256SUMS and that nothing else lies there.
  • Brass: the faces are read once per process with Typeface.createFromAsset; an asset that does not open leaves the system serif / monospace.
  • Brass Serif: menu keys (and the WebUI page's Close), dialog titles, section bands, the dialogs' buttons. Brass Mono: fields, check boxes, radio buttons, labels, dialog messages, the tunnel's state line, the status line over the video (the layout's monospace stays as the fallback), the version under Exit (a span: TypefaceSpan(Typeface) is API 28). Bold text becomes Brass Mono Bold.
  • The menu's cells are measured in Brass Serif, which is wider than the system serif: no label is clipped.
  • Overlays on the video (debug text, grid badges and stats) keep their faces: they were not brass.
  • tests/e2e.sh: SHOTS=1 also takes the camera's Settings and the Reset question.

Checks (local, Docker): unit tests, lint (13 warnings as before), check-version.sh; e2e UDP API 21 19/19, UDP API 34 19/19, TCP API 21 20/20, TCP API 34 20/20. Screenshots before and after with SHOTS=1 on API 21 and 34: menu, Network, Settings, Reset; nothing clipped. SHOTS=1 on API 21 fails "no picture in Decoder" before and after the change alike (the lighter stream on the old emulator); the screenshots are taken anyway.

The .ttf files add about 60 KB (compressed) to the APK.

….30.0)

Menu keys, dialog titles, section bands and the dialogs' buttons in Brass
Serif, the rest in Brass Mono; the .ttf files next to the page's .woff2,
read once, the system serif or monospace if one does not open. The menu's
cells are measured in Brass Serif. A test checks the fonts' SHA-256
against the brand's SHA256SUMS; SHOTS also takes Settings and Reset.

Closes #306
@compot-dev compot-dev added the enhancement New feature or request label Nov 24, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Apply Brass brand fonts to Android screens

✨ Enhancement 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Apply Brass Serif and Mono across Android menus, dialogs, and status text, matching the debug
 page.
• Load font assets once with system-font fallbacks and measure menu cells to prevent clipped labels.
• Verify asset checksums and capture Settings and Reset screenshots during end-to-end runs.
Merge Risk 🟢 Low

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: Android branded presentation, Diagnostic identity reporting.
  • The changed paths all contribute to one bounded end-to-end outcome: rendering the decoder's menu, dialogs, status line, and network state line in the brand's faces.
  • The propagation path is direct from font loading/application to that rendered UI; the separate classes are implementation hops rather than independent user capabilities.
  • This is a distinct bounded outcome from font rendering: identifying the installed release in generated diagnostic reports.
  • The propagation path is from build metadata to BuildConfig consumers in DebugServer, with no evidence that it changes camera streaming or persisted settings.
Sources

android/app/src/main/java/com/openipc/decoder/NetworkPanel.java[318-322]

        TextView state = new TextView(a);
        // the tunnel's state under Join, amber monospace as a display line (#286)
        state.setTextColor(Brass.color(a, R.color.amber));
        state.setTypeface(Brass.mono(a));
        state.setTag(R.id.brass_keep, true);

android/app/src/main/java/com/openipc/decoder/Decoder.java[284-286]

        statusText = findViewById(R.id.status_text);
        // the layout's monospace is the fallback; the brand's Brass Mono from the assets (#306)
        statusText.setTypeface(Brass.mono(this));
Behavioral complexity 🟡 Medium 🧩 Straightforward, Compatibility cases

  • The direct font assignments and menu measurement are straightforward presentation rules.
  • The compatibility case is the newly introduced asset-loading fallback: Before, the UI used Android's built-in serif/monospace faces directly.
  • After, it lazily loads three packaged faces once and falls back independently to the prior system face when asset creation throws.
  • The new correctness condition is that each screen must retain usable typography when an asset is absent or cannot be created, while the loaded face must be used consistently for measurement and rendering.
  • The MonoSpan additionally preserves the mixed-face Exit label on older Android versions without relying on TypefaceSpan.
Potential damage 🟢 Low 🩹 Cosmetic

  • If the changed font behavior regresses, the affected capability is the visual presentation of these Android screens: fonts may fall back, be applied to the wrong text, or produce layout differences.
  • The supported asset-open failure path preserves the prior system serif/monospace appearance, so that specific failure is contained to the intended branding change and does not remove the underlying controls or video behavior.
  • The consequence is conditional on a regression of the changed presentation behavior.
  • Reverting the application code or correcting/replacing the packaged font assets restores future rendering.
  • Screens already displayed do not require persistent-state repair, data migration, or external compensation.
Sources

android/app/src/main/java/com/openipc/decoder/Decoder.java[284-286]

        statusText = findViewById(R.id.status_text);
        // the layout's monospace is the fallback; the brand's Brass Mono from the assets (#306)
        statusText.setTypeface(Brass.mono(this));

android/app/src/main/java/com/openipc/decoder/NetworkPanel.java[318-322]

        TextView state = new TextView(a);
        // the tunnel's state under Join, amber monospace as a display line (#286)
        state.setTextColor(Brass.color(a, R.color.amber));
        state.setTypeface(Brass.mono(a));
        state.setTag(R.id.brass_keep, true);
Assessed commit c1e3e5f
Diagram

graph TD
  Assets["Font assets"] --> Brass["Brass loader"] --> Menu["Menu keys"]
  Brass --> Dialogs["Dialog text"]
  Brass --> Status["Status text"]
  Assets --> Test["Checksum tests"]
Loading
High-Level Assessment

The shared Brass loader fits the existing asset layout and provides one place for caching and fallbacks. Moving the Android fonts into separate resource-font wiring would duplicate their organization without a clear benefit for this change.

Files changed (9) +172 / -15

Enhancement (4) +95 / -11
Brass.javaCentralize Brass typefaces and dialog styling +88/-9

Centralize Brass typefaces and dialog styling

• Loads and caches three asset typefaces with system-font fallbacks. Applies them to section bands, buttons, fields, controls, titles, and other dialog text while preserving existing bold styling; adds an API 21-compatible span for mixed-face text.

android/app/src/main/java/com/openipc/decoder/Brass.java

Decoder.javaSet the video status line in Brass Mono +2/-0

Set the video status line in Brass Mono

• Applies the shared mono face to the status TextView, leaving its layout-defined monospace as the initial fallback.

android/app/src/main/java/com/openipc/decoder/Decoder.java

MenuManager.javaStyle and measure menu keys in Brass Serif +4/-1

Style and measure menu keys in Brass Serif

• Applies Brass Serif to menu items and uses that face when calculating word-cell width to avoid clipping. Displays the version beneath Exit in Brass Mono.

android/app/src/main/java/com/openipc/decoder/MenuManager.java

NetworkPanel.javaSet the tunnel state line in Brass Mono +1/-1

Set the tunnel state line in Brass Mono

• Replaces the system monospace face on the Network panel’s tunnel state line with the shared Brass Mono face.

android/app/src/main/java/com/openipc/decoder/NetworkPanel.java

Tests (2) +64 / -1
BrassFontsTest.javaVerify bundled font assets against brand checksums +51/-0

Verify bundled font assets against brand checksums

• Checks SHA-256 hashes for the three TTF faces, three WOFF2 faces, and license file. Also checks that the fonts directory contains exactly seven entries.

android/app/src/test/java/com/openipc/decoder/BrassFontsTest.java

e2e.shCapture Settings and Reset screenshots in SHOTS runs +13/-1

Capture Settings and Reset screenshots in SHOTS runs

• Extends screenshot runs to open the camera’s Settings and Reset dialogs, capture each, and close it before continuing. Updates the SHOTS header to describe the additional captures.

tests/e2e.sh

Documentation (2) +11 / -1
CHANGELOG.mdDocument the 2.30.0 Android font release +10/-0

Document the 2.30.0 Android font release

• Records where each Brass face appears, the asset-loading fallback, menu sizing, and unchanged video overlays.

CHANGELOG.md

usage.mdDescribe Brass typography in the menu guide +1/-1

Describe Brass typography in the menu guide

• Explains which Android menu and dialog elements use Brass Serif and Brass Mono.

docs/usage.md

Other (1) +2 / -2
build.gradleBump Android version to 2.30.0 +2/-2

Bump Android version to 2.30.0

• Increments versionCode from 71 to 72 and versionName from 2.29.1 to 2.30.0.

android/app/build.gradle

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@compot-dev
compot-dev merged commit 7677ab0 into v2 Nov 24, 2026
7 of 8 checks passed
@compot-dev
compot-dev deleted the feat/brass-fonts-android-306 branch November 24, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brass fonts on the Android screens (brand brass 1.5.1)

1 participant