Skip to content

[Bug]: Monospace text falls back to proportional font on Android mobile #4582

Description

@tastelessjolt

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Build and launch the Android mobile app from the current nightly source.
  2. Open a thread containing a fenced code block, expanded work-log detail, review comment, or another React Native text surface using font-mono.
  3. Compare characters with different widths, such as iiii and WWWW.

Expected behavior

Text styled with font-mono should use Android system monospace, matching the platform-specific monospace family already used by the native diff and markdown theme paths.

Actual behavior

The affected text renders with the proportional default font.

Tailwind defines --font-mono as a browser fallback list:

ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace

Uniwind compiles font-mono to a React Native fontFamily containing that entire string. React Native Android expects one exact family name, so Android cannot resolve the list and falls back to its default proportional typeface.

There are also a few Android-reachable paths with hardcoded iOS family names such as ui-monospace and Menlo, but the shared font-mono token accounts for the main set of affected surfaces.

Impact

Cosmetic issue. Code, logs, and other fixed-width content are harder to scan and aligned whitespace is not represented correctly.

Version or commit

Current nightly source around v0.0.29 nightly.

Environment

Android mobile app / React Native 0.85 / Uniwind 1.7.

Suggested smallest fix / workaround

Add an Android-scoped override in apps/mobile/global.css, inside the existing @layer theme { :root { ... } } block:

@variant android {
  --font-mono: "monospace";
}

A production Android bundle then contains an Android-scoped --font-mono: "monospace" value while leaving the current iOS and web fallback unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions