google / google/fonts

Google Sans Misalignment (Latin/Cyrillic)

Open
#10,394 2 comments 7 reactions 1 assignee Claimed by @aaronbell View on GitHub
I Font Bug
Dominant language
HTML
Stars
20.5k
Forks
2.9k
Avg merge
1d 21h
Merged PRs (30d)
95

Description

GoogleSans-VariableFont_GRAD,opsz,wght.ttf

**Describe the bug**

The Google Fonts version includes extra vertical padding, which increases the overall height of the TextView compared to the version used in the Google Pixel firmware.

For example, when using 14sp text with the default line height and the same font variation settings ('wght' 500, 'GRAD' 0, 'opsz' 17.0):

**• Google Pixel version:** The TextView height is 21dp.
**• Google Fonts version:** The TextView height increases to 32dp, which includes extra padding.

This discrepancy in vertical padding leads to layout inconsistencies, especially in designs where precise alignment and spacing are crucial. When using the Google Fonts version of Google Sans, developers may need to adjust padding or line height to match the expected appearance on devices running the Google Pixel firmware.

**To Reproduce**

Apply the Google Sans font from the Google Fonts website.

**Expected behavior**

To match the original Google Sans font from Google Devices.

**Screenshots**
![Image](https://github.com/user-attachments/assets/f47789c1-2ca3-4742-a9d7-ad43fda7120c)

**Additional context**
Android 14 (AOSP)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.