Skip to content

docs: document font requirement and clean up clippy warnings - #2

Open
delpix7 wants to merge 3 commits into
azytar:mainfrom
delpix7:docs/readme-font-and-quality
Open

docs: document font requirement and clean up clippy warnings#2
delpix7 wants to merge 3 commits into
azytar:mainfrom
delpix7:docs/readme-font-and-quality

Conversation

@delpix7

@delpix7 delpix7 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR documents LATT's font requirement for correct visual rendering and addresses two Clippy warnings found during a small code-quality pass.

Changes

Font requirement

  • Documented that LATT renders Halfwidth Katakana characters from U+FF66–U+FF9D.
  • Documented that font selection is handled by the terminal emulator, not LATT.
  • Documented Katana as the expected font for correct rendering.
  • Explained that missing glyph coverage results in tofu/empty squares while the program itself continues to run.
  • Added a localized source comment explaining the font requirement next to the KATAKANA character table.

Code quality

  • Replaced a range-indexing loop with iter().enumerate() to address needless_range_loop.
  • Replaced a redundant closure with a function pointer to address redundant_closure.
  • No behavioral changes intended.

Validation

The following checks pass:

  • cargo fmt --check
  • cargo check
  • cargo test
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --release

Scope

This PR is limited to documentation of the font requirement and small Clippy-driven cleanup. It does not change LATT's rendering behavior, timing, or architecture.

Integration note

This branch modifies part of Renderer::step(), which also changed in perf/no-per-frame-allocs.

GitHub currently reports that the branches cannot be automatically merged. The expected conflict should be resolved while preserving both changes.

Add an explicit Font Requirement section to the README. LATT emits
Halfwidth Katakana (U+FF66-U+FF9D) plus a small Latin symbol set, but
does not load or select any font itself — glyph rendering is delegated
to the terminal emulator. Katana is the expected font; without a
terminal font covering those glyphs the rain renders as tofu/empty
squares. This is documented as a requirement for the correct visual
result, not a cosmetic preference.
Add a localized comment at the KATAKANA glyph set explaining why these
characters need a terminal font with Halfwidth Katakana coverage
(Katana is the expected font) and that LATT delegates font selection to
the terminal emulator. Documents a non-obvious dependency at the point
where the characters are defined.
Fix two clippy lints in the render hot path:
- needless_range_loop in step(): iterate col_active_counts with
  enumerate() instead of indexing by a range variable.
- redundant_closure in resize(): pass Drop::new_inactive directly to
  map() instead of a trivial closure.

No behavioral change. cargo clippy --all-targets --all-features -D warnings now passes clean.
@azytar

azytar commented Aug 15, 2026

Copy link
Copy Markdown
Owner

well

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.

2 participants