Skip to content

Commit 24de605

Browse files
christianrobertsonJim Miller
authored andcommitted
Updating AndroidClock font to match the Roboto thin style for time display.
The primary difference between the AndroidClock and Roboto-Thin fonts is that the new clock font defaults to variable width characters for better alignment on the lock screen. Bug:7206207 Change-Id: I8509324510ce01d0a73ab1bb6b730b5d646a462c
1 parent e00d33c commit 24de605

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

data/fonts/AndroidClock.ttf

292 Bytes
Binary file not shown.

policy/src/com/android/internal/policy/impl/keyguard/ClockView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* Displays the time
4141
*/
4242
public class ClockView extends RelativeLayout {
43+
private static final String ANDROID_CLOCK_FONT_FILE = "/system/fonts/AndroidClock.ttf";
4344
private final static String M12 = "h:mm";
4445
private final static String M24 = "kk:mm";
4546

@@ -153,7 +154,7 @@ public ClockView(Context context, AttributeSet attrs) {
153154
protected void onFinishInflate() {
154155
super.onFinishInflate();
155156
mTimeView = (TextView) findViewById(R.id.clock_text);
156-
mTimeView.setTypeface(Typeface.create("sans-serif-thin", Typeface.NORMAL));
157+
mTimeView.setTypeface(Typeface.createFromFile(ANDROID_CLOCK_FONT_FILE));
157158
mAmPm = new AmPm(this, null);
158159
mCalendar = Calendar.getInstance();
159160
setDateFormat();

0 commit comments

Comments
 (0)