Default 96 dpi

I wrote about setting the default screen dots-per-inch at 96:
http://bkhome.org/blog2/?viewDetailed=00071

But there were complications and I went back to 78 dpi.

Now, I have changed permanently to 96.

One problem that we have always had is when a GTK3 or Qt-based app, say a DEB package, is installed, it's fonts render rather small on the screen. This is because they are designed for another distro, at 96 dpi. Puppy only has font theming for GTK2-based apps, which are designed for 78 dpi.

If the dpi in Puppy is bumped up to 96, all the scaled fonts will get bigger, but the GTK3/Qt fonts will still be smaller than the GTK2 apps.

So, I have created a new script, /usr/sbin/hackfontsize, that is called by '3builddistro' in Woof, or by /usr/local/petget/hacks-postinstall.sh (by the PPM) when a package is installed.

The new scripts adjusts old theme packages to render fonts the same size as before when on a 96 dpi screen setting.

Another affect of this is that at 96 dpi, the GTK2/GTK3/Qt fonts all render the same size.

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/146f1f8a60

In future, all JWM and GTK theme packages should be designed for 96 dpi, so a hack won't be required.


Posted on 26 Mar 2013, 21:41


Comments:

Posted on 26 Mar 2013, 21:48 by BarryK
SeaMonkey fonts
'hackfontsize' will need a bit more tweaking.
For example, our SeaMonkey PETs have font settings that are too large at 96 dpi.



Posted on 26 Mar 2013, 22:28 by Iguleder
Precise.2
Barry, Ubuntu 12.04.2 has 12.10's X.Org stack - I've built a Precise-like thing from the latest Trisquel 6.0 packages (equivalent to Ubuntu 12.04.2) and it works great.

I think it's a great opportunity - we could have Precise and Precise LTS, Ubuntu equivalents to Wary and Racy. If Canonical indeed invests time and money in the backport of the kernel and graphics stack of newer Ubuntu releases to tha ltest LTS, we could benefit from this, too ... for free :)


Posted on 27 Mar 2013, 4:15 by linuxcbon
fonts
Coincidence, I was looking at local.conf yesterday. Windows has better fonts it seems.


Posted on 27 Mar 2013, 9:19 by BarryK
dpi choice
I have reintroduced a choice of dpi setting in 3builddistro.

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/df3f80024f



Posted on 27 Mar 2013, 17:06 by scsijon
a pet for backward compat?
what about a pet for backward compatability changing?
Having a few qt packages in qtpy, as well as gtk3 and gtk2 in mage2 I wonder if it would be worth having a 'utility' to change those oldies.

I always wondered why things appeared in two sizes, but thought it was just fonts.


Posted on 28 Mar 2013, 11:00 by kirk
font size
You can let Xorg figure it out by not specifying Xft.dpi at all. Works OK as long as your monitor is EDID compliant. We almost did that, but decided to stay at 78dpi and let the user adjust it.


Posted on 28 Mar 2013, 18:59 by BarryK
Re 78 dpi problem
kirk,
I might not have explained it clearly in my original post.

We have themes for gtk2 apps, with font-sizes set to look ok at 78 dpi. However, if we install a gtk3 or qt app, there is no theme and the fonts will display at the default sizes, which are smaller than our gtk2 themes.

The same would be if we had no theme for gtk2 and it just displayed with its default settings, the fonts would be smaller.

If somehow the gtk3 and qt fonts can be made to display bigger, then ok. But, I don't know how to do that.

The easy solution, and bringing Puppy in-line with most other distros, is to bump the dpi to 96, so the default gtk3 and qt app fonts look ok, and to modify our gtk2 and jwm themes to have smaller font sizes.

Then, out of the box, all font sizes will match, for gtk2, gtk3 and qt.

Another reason for going up to 96 is that antialiasing can be made to look better.
We have a new PET, Fontwizard (see Desktop menu in recent 5.5 pups), where I was advised that the settings look best with 96 dpi or higher.



Posted on 28 Mar 2013, 19:10 by 01micko
re 96dpi
I changed all my JWM themes by reducing fontsize by 2, works. However, get a "unary operator expected" error in your hack script. IIRC, line 69??

Here it is.. rootfs-complete/usr/sbin/hackfontsize: line 66: [: -lt: unary operator expected

Still works though as those relevant files are unchanged.

Works ok for files made before your deadline.


Posted on 28 Mar 2013, 21:49 by pemasu
qt fonts default look
I have used Trolltech file preinstalled to have qt fonts and theming look better.
I have installed it to all my builds during woofing.

http://www.smokey01.com/pemasu/Misc/qt-fonts-Trolltech-file-0.0.1.pet

/root/.config/Trolltech.conf


Posted on 28 Mar 2013, 23:46 by L 18 L
dpi issues
Unsolved issues also with dpi in HUG (BaCon)
http://www.murga-linux.com/puppy/viewtopic.php?t=85176&start=11



Posted on 29 Mar 2013, 8:46 by BarryK
Re line 66
01micko,
I am very puzzled, I can't see anything wrong with line 66.

In a running pup, you can run 'hackfontsize' two ways:

# hackfontsize

or

# hackfontsize "JWMTHEMES=/root/.jwm/jwmrc-theme"

...the latter specifies a JWM theme file.

I have just tested, I don't get that error.

Ah, in Precise I have the full 'stat', from 'coreutils'. If you have busybox stat, it won't work.



Posted on 29 Mar 2013, 8:55 by BarryK
Re busybox stat
I modified 'hackfontsize' so the busybox stat will work:

#130329 changed stat --format=%Y to stat -c %Y, so busybox applet will work.



Posted on 29 Mar 2013, 8:59 by BarryK
coreutils stat
I just checked, the 'coreutils' template in woof does build with the 'stat' utility. Tested with slackware spup14.

Maybe not with an earlier woof though.



Posted on 29 Mar 2013, 8:06 by BarryK
re hug dpi
L18L,
I don't see any problem.
I solved that problem a long time ago:

http://bkhome.org/bacon/hug/layout.htm

Both /usr/share/doc/welcome1stboot.bac and /usr/local/simple_network_setup/proxy-setup.bac in Woof use that method.



Posted on 29 Mar 2013, 8:29 by BarryK
Qt default theming
pemasu,
Thanks, I have added that file to Woof.

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/8213b182f2

However, I took out the cache sections.

I also modified the DejaVu Sans "12" to "10", but I don't know about the other parameters on that line.

Could you help out there? If the font size is dropped from 12 to 10, will any of the other values on that line need to be changed?

A thought: Trolltech no longer owns Qt, so I wonder if Trolltech.conf will still work with Qt5 apps?



Posted on 29 Mar 2013, 8:35 by BarryK
Re Qt default theming
If all those other parameters are just the default anyway, then they could probably all be removed, except the ones that are actually different from default:

In other words, maybe the file could be just this:

[Qt]
font="DejaVu Sans,10,-1,5,50,0,0,0,0,0"



Posted on 29 Mar 2013, 9:39 by 01micko
coreutils
Yes, I have slackware "stat" plus it was woof from yesterday. The error is harmless, as the files are new ones, after your deadline. With 96dpi JWM themes are sane.


Posted on 31 Mar 2013, 19:34 by L 18 L
re re hug dpi
Posted on 29 Mar 2013, 8:06 by BarryK
re hug dpi
L18L,
I don't see any problem.
I solved that problem a long time ago:

http://bkhome.org/bacon/hug/layout.htm

Both /usr/share/doc/welcome1stboot.bac and /usr/local/simple_network_setup/proxy-setup.bac in Woof use that method.


I confirm you have solved that problem a long time ago.
http://www.murga-linux.com/puppy/viewtopic.php?t=85176&start=23