Icons and fonts are too small at Gingerbread (Resolved)

At the previous post, size of icons and fonts are smaller than expected. I investigated this and resolved.
(Japanese version of this page)

Different appearance, why?

Screen of froyo
DSC00257

Screen of gingerbread
DSC00340

At gingerbread on KZM-A9-Dual, size of icons and fonts are too small.
At Nexus One, upgrading from Froyo to Gingerbread does not cause this. I want to make KZM-A9-Dual the same appearance as Nexus One.

Compare log output as Nexus One

At first, I tought gralloc in SurfaceFlinger is wrong, which get screen info from the frame buffer device driver of the kernel.

With the following command you can save log of logcat to a file. Do this for both Nexus One and KZM-A9-Dual. And compare them.

$ adb logcat -d > logcat.txt

Searching log for ‘gralloc’
Log of Nexus One

I/SurfaceFlinger(   96): SurfaceFlinger is starting
I/SurfaceFlinger(   96): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
I/qsd8k.gralloc(   96): using (fd=24)
I/qsd8k.gralloc(   96): id           = msmfb
I/qsd8k.gralloc(   96): xres         = 480 px
I/qsd8k.gralloc(   96): yres         = 800 px
I/qsd8k.gralloc(   96): xres_virtual = 480 px
I/qsd8k.gralloc(   96): yres_virtual = 1600 px
I/qsd8k.gralloc(   96): bpp          = 32
I/qsd8k.gralloc(   96): r            =  0:8
I/qsd8k.gralloc(   96): g            =  8:8
I/qsd8k.gralloc(   96): b            = 16:8
I/qsd8k.gralloc(   96): width        = 48 mm (254.000000 dpi)
I/qsd8k.gralloc(   96): height       = 80 mm (254.000000 dpi)
I/qsd8k.gralloc(   96): refresh rate = 60.00 Hz

Log of KZM-A9-Dual

I/SurfaceFlinger(   80): SurfaceFlinger is starting
I/SurfaceFlinger(   80): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
I/gralloc (   80): using (fd=24)
I/gralloc (   80): id           = EMXX FB
I/gralloc (   80): xres         = 800 px
I/gralloc (   80): yres         = 480 px
I/gralloc (   80): xres_virtual = 800 px
I/gralloc (   80): yres_virtual = 5184 px
I/gralloc (   80): bpp          = 24
I/gralloc (   80): r            =  0:8
I/gralloc (   80): g            =  8:8
I/gralloc (   80): b            = 16:8
I/gralloc (   80): width        = 127 mm (160.000000 dpi)
I/gralloc (   80): height       = 76 mm (160.421051 dpi)
I/gralloc (   80): refresh rate = 60.00 Hz

the value of yres_virtual, width, height and dpi is different.

As an experiment, I modified source file of gralloc to set (yres *2) to yres_virtual. Then redrawing screen becomes wrong, but size of icons and fonts are not changed.

Reverting yres_virtual, then I modifed width and height values and adjust to 254dpi, the same as Nexus One. But nothing changed. This part does not seem matter.

Compare items of system property as Nexus One

Next, save items of system property to each files.

$ adb shell getprop > prop.txt

And compare them … I found it.
The following item of system property exist in Nexus One, but not in KZM-A9-Dual.

[ro.sf.lcd_density]: [240]

Searching source tree, I found this system property is referred at these files.
– frameworks/base/services/surfaceflinger/DisplayHardwareDisplayHardware.cpp
– frameworks/base/core/java/android/util/DisplayMetrics.java

At Nexus One’s source tree, this system property is set at ‘device/htc/passion/passion.mk’

I know I should make my own ‘device’ directory and do similar. I add this setting to ‘default.prop’ at root directory of the target.
/default.prop

ro.sf.lcd_density=240

Boot again … Good. The same appearance as Nexus One.
DSC00343DSC00342

When I checked the KZM-A9-Dual implementation of Froyo, which is ported from Renesas Electornics BSP, I found ‘ro.sf.lcd_density = 240’ at system.prop file.

One more thing …

In gingerbread, GPU is more important for comfortable UI. But in this article 3D hardware accelaration library of KZM-A9-Dual is not yet enabled. User Experience is not good.

You had better to set disable animation at screen transition.
At Settings application,

 Display > Animation > No Animations

Related pages

Quick hack to run Android 2.3(Gingerbread) on KZM-A9-Dual board

Advertisements

About tetsu_koba

Engineer.
This entry was posted in Android, KZM-A9-Dual. Bookmark the permalink.

One Response to Icons and fonts are too small at Gingerbread (Resolved)

  1. Pingback: Quick hack to run Android 2.3(Gingerbread) on KZM-A9-Dual board « Koba's blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s