Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Lyra theme: button-hint labels wrap to two lines in many languages

Open
#4,027 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start in src/components/themes/lyra/LyraTheme.cpp at drawButtonHints and inspect BaseTheme::drawHintLabel in src/components/themes/BaseTheme.cpp, including the SMALL_FONT_ID setup in src/main.cpp. Review the narrow and wide X3 layouts and translation strings before choosing whether to adjust sizing, padding, fonts, or validation in scripts/gen_i18n.py. Verify that the listed home and back labels render on one line in both layouts and that other theme layouts remain unaffected.

Written by the indexing model from the issue text.

Description

Problem

In the Lyra theme, the bottom button-hint labels wrap onto a second line in many languages, so e.g. Latvian « Sākums renders as « on one line and Sākums on the next. Seen on an Xteink X3.

Cause

  • LyraTheme::drawButtonHints uses buttonWidth = 80 (src/components/themes/lyra/LyraTheme.cpp:120).
  • BaseTheme::drawHintLabel subtracts textPadding = 4 per side (src/components/themes/BaseTheme.cpp:184-185), so text over 72 px wraps to two lines.
  • Lyra draws hints with SMALL_FONT_ID = notosans_8_regular (src/main.cpp:128).

BaseTheme uses 106 px buttons (98 px for text), so the issue mainly hits Lyra.

Affected labels

Widths are the sum of glyph advanceX values in notosans_8_regular, checked against the 72 px limit (STR_HOME / STR_BACK only):

Label Width (px)
« Màn hình chính 134.8
« Ana Sayfa 89.6
« Галоўная 87.9
מסך הבית » 84.3
« Beranda 79.2
« Главная 78.9
« Takaisin 76.6
« Kembali 76.3
« Quay lại 76.3
« Додому 76.1
« Početna 76.0
« Indietro 75.6
« Sākums 74.1
« Начало 73.2
« Główna 72.1

I didn't check other button-hint strings, so there may be more.

Workaround (Latvian, #3376)

PR #3376 drops the space after the guillemet: STR_HOME: "«Sākums" measures about 70 px and fits on one line. This only fixes Latvian.

Possible fixes

  • Widen Lyra's hint buttons. On the narrow layout, positions {58, 146, 254, 342} leave an 8 px gap between buttons 1 and 2, so there's little room; the wide X3 layout {65, 157, 291, 383} has more.
  • Reduce textPadding for Lyra, or shrink the font only when a label doesn't fit.
  • Add a translation-time check (e.g. in scripts/gen_i18n.py) that flags hint strings wider than the smallest theme's limit.
Dominant language
C
Stars
8.2k
Forks
2k
Avg merge
2d 8h
Merged PRs (30d)
140

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crosspoint-reader/crosspoint-reader

All issues in crosspoint-reader/crosspoint-reader

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.