google / google/material-design-icons
TrueType font glyph positioning
- Dominant language
- No language data
- Stars
- 54k
- Forks
- 9.7k
- PR merge metrics
- No merged PRs in 30d
Description
The glyphs in the TrueType font are positioned oddly, which makes them very hard to use in conjunction with other text (such as when trying to place an icon next to some text). The glyph icon should fill the box from the baseline to the cap height line. When done this way (as all other symbol fonts are), it makes it easy both the baseline align the symbol with text of comparable size, or to center align the symbol with text of any size.
With the glyph jammed up at the top of the box (the top of the glyph seems to be above the cap height line, and the bottom is well above the baseline), it's pretty much impossible to align the symbol with text without manually tweaking it. This turns out to be a huge pain (the amount of padding you have to add to fix it is proportional to the height of the font, so you have to do second/deferred layout pass to compute that).
Attached is a screen shot showing the font box and how normal text, normal symbols, and the Material Design icon symbols occupy it (I did this in Microsoft Word, so none of that oddness is due to code - that's how the font presents).

Contributor guide
Research direction
Start by inspecting how the TrueType font defines glyph metrics relative to the baseline and cap-height line, using the attached screenshot as the visual reference. Confirm that the glyph fills the expected box and aligns with comparable text without manual padding; the payload names no source files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Domain
- design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100