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)
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

index 4085cee..b7bf5b4 100644 (file)
Binary files a/data/fonts/DroidSansMono.ttf and b/data/fonts/DroidSansMono.ttf differ