Repository navigation
fix(layout): stop shrinking single-character key labels per key - #814
Merged
Merged
Conversation
The floating-keyboard label fit ran on every keyboard and scaled each label by its own width, so wide glyphs (w, m, and Cyrillic sh/shch/yu) rendered smaller than other letters, most visibly on layouts with hint labels. Restrict the fit to the floating keyboard and to multi-character labels so single letters keep the uniform font size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Wide letters (w, m, and Cyrillic sh/shch/yu) rendered smaller than other letters on the keyboard in v4.3.3-beta2. Reported for English, Russian and Portuguese.
Motivation & Context
Commit 9ce4f9e (floating keyboard fix) added a per-key label fit in
KeyboardView.onDrawKeyTopVisualsthat shrank any label wider than 85% of the key width (tighter when a hint label is shown). It ran on every keyboard, so the widest glyphs were scaled down individually, most visibly on layouts with hint labels.Changes Made
KeyboardView.kt: apply the label and hint fit only while the floating keyboard is active, and only to multi-character labels (e.g. 123, ABC). Single-character labels keep the uniform font size in all modes.Verification & Testing
./gradlew :app:assembleStandardDebugGuidelines Checklist