Skip to content

6.3.0: the Android app in brass 1.5.1 fonts - #222

Merged
compot-dev merged 1 commit into
masterfrom
android-brass-fonts
Nov 24, 2026
Merged

compot-dev merged 1 commit into
masterfrom
android-brass-fonts

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

The camex Android app's screens move to brand's brass 1.5.1 fonts, following microsnander 1.55.1 (its PRs #115 and #116). This is the Android counterpart of the start page's fonts (#221).

  • android/app/src/main/assets/fonts/ holds BrassSerif-Bold.ttf, BrassMono-Regular.ttf, BrassMono-Bold.ttf and OFL.txt, byte for byte as brand gives them.
  • Brass reads each face once per process with Typeface.createFromAsset, which works from API 21. If an asset does not open, the system serif or monospace stays.
  • Brass Serif is used for the headings, section bands and buttons. Brass Mono is used for the board, the subtitle, field labels and inputs, check boxes, radio buttons and the log.
  • Brass.fonts(view) walks each screen after setContentView and fills in the views built without a face. A face that is already set stays as it is.
  • Input fields now get Brass Mono after setInputType. Before, a number field (MTU, keepalive) was left in the system face, because setInputType resets the typeface.
  • Button text is now 13sp with 0.1 letter spacing, down from 14sp and 0.15. Brass Serif Bold is wider than the system serif, and at the old size SETTINGS wrapped to two lines in a third of a 360dp phone.
  • The new unit test FontsTest checks the app's fonts and the start page's src/fonts/ against brand's SHA-256 sums. It also checks that no other font files are present.
  • The release APK grows from 321 KB to 382 KB (+60 KB, local unsigned builds).

Checked locally in compot/android:2026.10: testReleaseUnitTest lintDebug assembleRelease pass, and .github/check-version.sh passes. Screenshots before and after were taken on API 21 and API 34 emulators: the main screen, the log, and the settings opened from a link and scrolled down.

…from assets), no system face left on its screens
@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 1.5.1 fonts across Android screens

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Give Android headings and buttons Brass Serif, and labels, inputs, the board, and log Brass Mono.
• Restore Brass Mono after input-type changes and resize buttons to prevent SETTINGS from wrapping.
• Verify font assets against brand checksums and document the 6.3.0 release and licensing.
Merge Risk 🟢 Low

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: Android application presentation, Release identity and version reporting.
  • The changed paths all affect one bounded Android presentation integration: Brass supplies the typefaces and both activities invoke the tree-wide application routine, while the theme supplies the shared button presentation.
  • These are implementation locations for the same screen-rendering outcome rather than independent capabilities.
  • This is independent of Android typography: it controls the version identity compiled into artifacts and reported by the application, whereas the other capability controls visual presentation.
  • The version header is consumed by both the application build and the tunnel library build.
Sources

src/version.h[15-17]

#ifndef CAMEX_VERSION
#define CAMEX_VERSION "6.3.0"
#endif

android/app/src/main/java/org/openipc/camex/MainActivity.java[121-122]

        // the brass faces on what is made here without one: the subtitle, the check boxes
        Brass.fonts(scroll);

android/app/src/main/java/org/openipc/camex/SettingsActivity.java[145-146]

        // the brass faces on what is made here without one: labels, radio buttons, check boxes
        Brass.fonts(page);

android/app/src/main/res/values/themes.xml[52-55]

        <!-- 13sp, 0.1: SETTINGS in Brass Serif, wider than the system serif, keeps to one
             line in a third of a 360dp phone (brass 1.5.1) -->
        <item name="android:textSize">13sp</item>
        <item name="android:letterSpacing">0.1</item>
Behavioral complexity 🟢 Low 🧩 Straightforward

  • The change adds a cached asset lookup with an existing system-font fallback and direct typeface assignments, then traverses already-built Android view trees to apply those styles.
  • The changed correctness condition is that each screen receives the intended typeface or a readable fallback; there is no new protocol, persistent-state invariant, concurrency protocol, or cross-component business interaction.
  • The synchronized cache and recursive traversal are implementation mechanics, not new coordinated state behavior.
Sources

android/app/src/main/java/org/openipc/camex/MainActivity.java[121-122]

        // the brass faces on what is made here without one: the subtitle, the check boxes
        Brass.fonts(scroll);

android/app/src/main/java/org/openipc/camex/SettingsActivity.java[145-146]

        // the brass faces on what is made here without one: labels, radio buttons, check boxes
        Brass.fonts(page);
Potential damage 🟢 Low 🩹 Cosmetic

  • If the changed behavior regresses, the supported consequence is incorrect visual typography or button layout on the Android screens.
  • The cited fallback preserves system serif/monospace faces when an asset cannot be opened, and the change does not alter tunnel operation, settings values, persistent state, or external effects.
  • Restoring the prior APK or rebuilding with the prior UI code restores presentation; no state repair or external compensation is required.
  • Fully reversible by reinstalling/reverting the app build.
  • A runtime fallback to system faces preserves readable UI behavior when an individual font asset cannot be opened.
Sources

android/app/src/main/java/org/openipc/camex/MainActivity.java[121-122]

        // the brass faces on what is made here without one: the subtitle, the check boxes
        Brass.fonts(scroll);

android/app/src/main/java/org/openipc/camex/SettingsActivity.java[145-146]

        // the brass faces on what is made here without one: labels, radio buttons, check boxes
        Brass.fonts(page);

android/app/src/main/res/values/themes.xml[52-55]

        <!-- 13sp, 0.1: SETTINGS in Brass Serif, wider than the system serif, keeps to one
             line in a third of a 360dp phone (brass 1.5.1) -->
        <item name="android:textSize">13sp</item>
        <item name="android:letterSpacing">0.1</item>
Assessed commit bb9eacb
Diagram

graph TD
  Main["MainActivity"] --> Brass["Brass font helper"] --> Assets["Android font assets"]
  Settings["SettingsActivity"] --> Brass
  Tests["FontsTest"] --> Assets
  Tests --> Web["Start page fonts"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Define fonts through Android resources and styles
  • ➕ Could make font assignments more declarative and reduce whole-tree traversal.
  • ➖ Would require broader changes to programmatically created views and still need explicit handling after setInputType resets a face.

Recommendation: Keep the centralized asset loader and screen-level assignment: they fit the existing programmatic UI and API 21 support. Explicitly restoring EditText faces after input-type changes addresses the case that a one-time view traversal cannot cover.

Files changed (11) +256 / -20

Enhancement (2) +84 / -8
Brass.javaLoad and assign Brass faces across Android views +82/-8

Load and assign Brass faces across Android views

• Caches asset-backed Serif and Mono faces with system-font fallbacks. Uses them in Brass-built components and adds a view-tree pass for text views without an assigned Brass face.

android/app/src/main/java/org/openipc/camex/Brass.java

MainActivity.javaApply Brass faces to the main screen +2/-0

Apply Brass faces to the main screen

• Runs the font-assignment pass after the main screen is attached, covering text such as the subtitle and check boxes.

android/app/src/main/java/org/openipc/camex/MainActivity.java

Bug fix (1) +6 / -4
SettingsActivity.javaApply Brass faces and preserve input fonts in settings +6/-4

Apply Brass faces and preserve input fonts in settings

• Runs the font-assignment pass over settings labels and controls. Restores Brass Mono after input-type changes, including password visibility toggles.

android/app/src/main/java/org/openipc/camex/SettingsActivity.java

Tests (1) +50 / -0
FontsTest.javaVerify Android and start-page font assets +50/-0

Verify Android and start-page font assets

• Checks SHA-256 hashes for the Android and start-page fonts and licenses. Also asserts the Android font directory contains only the expected files.

android/app/src/test/java/org/openipc/camex/FontsTest.java

Documentation (5) +111 / -5
CHANGELOG.mdDocument the 6.3.0 Android font release +12/-0

Document the 6.3.0 Android font release

• Records the new font assignments, bundled assets, input-face fix, button sizing, and checksum coverage.

CHANGELOG.md

README.mdExtend English font licensing notice to Android +2/-2

Extend English font licensing notice to Android

• Adds the Android font asset directory to the SIL Open Font License notice.

README.md

README.ru.mdExtend Russian font licensing notice to Android +3/-2

Extend Russian font licensing notice to Android

• Adds the Android font asset directory to the Russian licensing section.

README.ru.md

README.zh-CN.mdExtend Chinese font licensing notice to Android +1/-1

Extend Chinese font licensing notice to Android

• Adds the Android font asset directory to the Chinese licensing section.

README.zh-CN.md

OFL.txtBundle the font license with Android assets +93/-0

Bundle the font license with Android assets

• Includes the SIL Open Font License and copyright notice alongside the Android fonts.

android/app/src/main/assets/fonts/OFL.txt

Other (2) +5 / -3
themes.xmlReduce Brass button text size and spacing +4/-2

Reduce Brass button text size and spacing

• Changes button text from 14sp to 13sp and letter spacing from 0.15 to 0.1 to keep SETTINGS on one line at narrow widths.

android/app/src/main/res/values/themes.xml

version.hBump camex version to 6.3.0 +1/-1

Bump camex version to 6.3.0

• Changes the default CAMEX_VERSION from 6.2.1 to 6.3.0.

src/version.h

@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 a19fc7e into master Nov 24, 2026
18 checks passed
@compot-dev
compot-dev deleted the android-brass-fonts branch November 24, 2026 01:09
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