We have moved to a new Sailfish OS Forum. Please start new discussions there.

Browser font size

asked 2013-12-25 14:29:26 +0300

Plnt gravatar image

It would be great if it would be possible to set default browser font size like it's on Nokia N900 in Web -> Options -> Adjust view -> Text size -> Normal / Large / Very large. Current default font size makes many pages unreadable because of small letters. Zooming it won't help much here because it requires to move the viewport on each line when reading text paragraph which has larger width than the actual screen size.

edit retag flag offensive close delete


Ui font size requests adjustable font sizes for all applications.

axaq ( 2013-12-28 16:35:00 +0300 )edit

Seeing poor font in browsers on other devices (most notably BlackBerry Q10) I would also say that increasing font should override/adjust/correct web site wishes. Too many sites nowadays set precise font size in pixels hence looking minuscule in BB10 browser regardless of huge font setting.

Artem ( 2013-12-29 04:48:30 +0300 )edit

Bumping up this old question: now in Sailfish there is a setting for the system font, but apparently no provision yet for the web browser and the other apps.

Has the situation changed or is the proposed workaround in the answer below still the only way to increase the minimum browser font?

simosagi ( 2017-04-02 17:01:52 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-12-31 02:17:02 +0300

qwazix gravatar image

Editing userContent.css is a currently acceptable workaround

mkdir .mozilla/mozembed/chrome/
nano .mozilla/mozembed/chrome/userContent.css


body { font-size: 120% !important }

this will not affect webpages which specify pixel sizes for all fonts but you can target specific websites with @-moz-document domain

for example for tmo

@-moz-document domain("talk.maemo.org"){
    body,.postdetails{font-size: 200%}

another solution is to modify user preferences to change the default viewport of the browser. The default viewport is set (like an iPhone) to 980px with which the grand majority of websites render correctly, but results to tiny text that needs side-scrolling when zoomed.

A value of 800px (like microb) is a pretty good compromise as it doesn't break too many sites, and makes fluid websites a bit narrower so that you can zoom in more before requiring side-scrolling to read the main body of text. You can do that by editing ~/.mozilla/prefs.js and adding user_pref("browser.viewport.desktopWidth", 800); while the browser is not running.

Note that the right way to do it according to mozilla is to create a file ~/.mozilla/user.js and not edit prefs.js directly, and the browser should copy the value to prefs.js automatically. However I read that after I edited the file so YMV. Editing user.js does not (reportedly) require having the browser closed, but you might need to restart to apply anyway.

edit flag offensive delete publish link more


Does this still work in SFOS 2.0? I can't get the browser to recognize userContent.css. I tried restarting the browser after every change, but I didn't see any effects.

Camil B ( 2015-12-15 19:26:53 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2013-12-25 14:29:26 +0300

Seen: 773 times

Last updated: Dec 31 '13