On Friday, November 22, 2013 1:30:37 PM UTC+2, Alexandre Lissy wrote:
> Le 22/11/2013 10:33, Tim Chien a �crit :
> 
> > On Fri, Nov 22, 2013 at 4:51 PM, Alexandre Lissy <[email protected]> wrote:
> 
> >> Le 22/11/2013 08:44, Manjunatha M a �crit :
> 
> >>> Hi,
> 
> >>>
> 
> >>> I have ported firefox on to a android device which is 720x1024 pixels.
> 
> >>>
> 
> >>> All the icons and fonts look very small when compared to the size of the
> 
> >>> device. Is there a single place in the code where I can change to make the
> 
> >>> fonts size bigger?
> 
> >>>
> 
> >>
> 
> >> You need to flash gaia with setting the GAIA_DEV_PIXELS_PER_PX variable
> 
> >> to either 1, 1.5 or 2 depending on the DPI of your device.
> 
> > 
> 
> > That will make the images sharp on hi-res phone but will not make the
> 
> > UI bugger. Sorry.
> 
> 
> 
> Yep, but since the issue was about icons and fonts, and since we had no
> 
> screenshot to cross check, I suspected maybe it was not flashed with the
> 
> proper infos :)
> 
> 
> 
> > 
> 
> >> https://mxr.mozilla.org/mozilla-central/source/widget/gonk/nsWindow.cpp#539

There is this hack I found for that file which worked for me:

nsWindow::GetDPI()
 {
    // Note that xdpi value depends on graphic HAL and FB driver implementation
    // sometimes unreliable while ro.sf.lcd_density is defined in PRODUCT_PROPE
    // we have.
    // Query xdpi from ANativeWindow except if ro.sf.lcd_density property is av
    char density[PROPERTY_VALUE_MAX];
    property_get("ro.sf.lcd_density", density, nullptr);

    return density ? atoi(density) : NativeWindow()->xdpi;
 }

> 
> > 
> 
> > This however is the correct place to start. Your Android phone must
> 
> > have reported a bad DPI value to Gecko.
> 
> > The easiest way to do things would be manually come up with the value
> 
> > [1] and hard code it in the function above.
> 
> > 
> 
> > The proper way to do thing might be fix what's underneith.
> 
> > 
> 
> > [1] http://members.ping.de/~sven/dpi.html
> 
> > 
> 
> >> _______________________________________________
> 
> >> dev-b2g mailing list
> 
> >> [email protected]
> 
> >> https://lists.mozilla.org/listinfo/dev-b2g
> 
> > 
> 
> > 
> 
> >
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to