Default 96 dpi
March 26, 2013 —
BarryK
I wrote about setting the default screen dots-per-inch at 96:
http://bkhome.org/archive/blog2/201212/96-dots-per-inch.html
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.
Comments
SeaMonkey fontsUsername: BarryK
'hackfontsize' will need a bit more tweaking. For example, our SeaMonkey PETs have font settings that are too large at 96 dpi.
Precise.2
Username: Iguleder
"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 :)
dpi choice
Username: BarryK
"I have reintroduced a choice of dpi setting in 3builddistro. Woof commit: http://bkhome.org/fossil/woof2.cgi/info/df3f80024f
a pet for backward compat?
Username: scsijon
"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.
Re 78 dpi problem
Username: BarryK
"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.
re 96dpi
Username: 01micko
"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.. [i]rootfs-complete/usr/sbin/hackfontsize: line 66: [: -lt: unary operator expected[/i] Still works though as those relevant files are unchanged. Works ok for files made before your deadline.
qt fonts default look
Username: pemasu
"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
dpi issues
Username: L 18 L
"Unsolved issues also with dpi in HUG (BaCon) http://www.murga-linux.com/puppy/viewtopic.php?t=85176&start=11
Re line 66
Username: BarryK
"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.
Re busybox stat
Username: BarryK
"I modified 'hackfontsize' so the busybox stat will work: [i]#130329 changed stat --format=%Y to stat -c %Y, so busybox applet will work.[/i]
coreutils stat
Username: BarryK
"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.
re hug dpi
Username: BarryK
"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.
Qt default theming
Username: BarryK
"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?
Re Qt default theming
Username: BarryK
"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"
re re hug dpi
Username: L 18 L
"[i]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] I confirm [b]you have solved that problem[/b] a long time ago. http://www.murga-linux.com/puppy/viewtopic.php?t=85176&start=23 [img]http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=66204[/img]
Tags: woof