diff options
author | Danny Lin <danny@kdrag0n.dev> | 2022-02-17 17:38:19 -0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-07 00:20:58 +0800 |
commit | 2264c25527258109f3c0b804c65f1b95da67e265 (patch) | |
tree | 44072b5d07babd606919889f3bce62aa07284c84 /opengl/java | |
parent | fa799a9081aa0912598a3a88f13ca456964bf718 (diff) |
Implement Inter Dynamic Metrics for system UI font
Inter, our system UI font of choice, works best with the official
Dynamic Metrics. The font's default spacing makes text relatively sparse
compared to Roboto, Google Sans Text, and other common UI fonts. Dynamic
Metrics optimizes tracking (letter spacing) based on font size to improve
appearance. Spacing is increased for small text and decreased for larger
text, making it generally more compact and closer to Apple's SF Pro.
Math.exp is relatively expensive, so use a precalculated lookup table
for common sizes (up to 32dp). The LUT follows steps of 0.5dp so we can
safely use integer casting.
For compatibility, only the default system UI font is affected, and only
if spacing is unset (null or 0).
Change-Id: I48642f05f4b60b07326f657aaac76d968465a5dd
Diffstat (limited to 'opengl/java')
0 files changed, 0 insertions, 0 deletions