OSDN Git Service

Fix ascent and descent of Droid Sans Mono to match Roboto.
authorRoozbeh Pournader <roozbeh@google.com>
Sun, 14 Jun 2015 01:49:35 +0000 (18:49 -0700)
committerRoozbeh Pournader <roozbeh@google.com>
Sun, 14 Jun 2015 01:49:35 +0000 (18:49 -0700)
commit82ef167fca52593c4c4df78691db0e8253067c6f
tree962b851cd85c16e09640b5cf1841c601660d4dd8
parent715cf2ac0bcd44720096cc91709b690b4828f0df
Fix ascent and descent of Droid Sans Mono to match Roboto.

Previously, the inconsistency resulted in test in the testUniformY in
frameworks/base/graphics/tests/graphicstests/src/android/graphics/TypefaceTest.java
fail. The tests assume the different sans/serif/mono styles share a
consistent ascent and descent.

The font is modified using the following Python script:

from fontTools import ttLib

font_file = 'DroidSansMono.ttf'
font = ttLib.TTFont(font_file)
font['hhea'].ascent = 1900
font['hhea'].descent = -500
font.save('touched/'+font_file)

Bug: 19791102
Change-Id: I2fcd44b952691deeeed18f30d06bc9f6d5e4a8de
data/fonts/DroidSansMono.ttf