# Tag Archives: x11

Anything related to X11

# Slow Terminal with xfce, alpha channel issues

I recently switched to using xfce on my FreeBSD desktop. Window Maker is nice but it was starting to feel a bit dated. Thus far I like xfce, but I had one problem with Terminal. Whenever I tried to resize it or switch desktops to one with Terminal open in it I could see it painstakingly render the window. Xterm and aterm didn’t exhibit this behaviour, my 3d was accelerated, and other screen drawing didn’t show problems either (do note I am using NVIDIA’s binary driver for my GeForce 8800, the nv driver from X.org is unusable at this point).

Someone pointed me at the environment variable XLIB_SKIP_ARGB_VISUALS=1. Once added to .zshenv, properly exported on my shell and an X restart later I find Terminal to zoom along as expected. It turns out that the NVIDIA driver doesn’t properly accelerate alpha channels.

# AmanithVG test on FreeBSD

I recently had the pleasure to have Matteo Muratori of Mazatech s.r.l. ask me to test their OpenVG implementation called AmanithVG. On my FreeBSD 6.2-STABLE machine running X.Org 6.9 with NVIDIA binary drivers I proceeded to test their 1.0 candidate implementation. I had to install the graphics/libglut port to satisfy a dependency, but after that every thing worked quite well. The speed was quite impressive, especially given that my current work PC is not exactly state of the art.

The possibilities that it, and OpenVG, presents are impressive. It seems to be reasonably easy to create blurring filters that apply in real-time, overlapping images that allow colours to blend, zooming in and out of images, and so on. This opens a lot of possibilities for normal desktop environments as well, I think. If you look at what, say, Beryl is doing on the Unix desktops I think it can benefit from what OpenVG does. Of course, the real goal for OpenVG is more aimed at mobile phones or other handhelds, but I think we can easily look beyond just those platforms.

Repeat after me: if X (X.org or XFree86) has XTHREADS defined in Xlib it does NOT automatically mean you have to add -lpthread to your LIBS line.

I still wonder which smart person got that generalistic idea.

In this case it is glitz from the Cairo Graphics project to run dead on DragonFly. *sigh*

# Multibyte on Window Maker

Weird that one has to twiddle Window Maker to support multibyte.

You need to edit $HOME/GNUstep/Defaults/WMGLOBAL and $HOME/GNUstep/Defaults/WindowMaker and add MultiByteText = Yes; to the contents of the file.

# True Type fonts, X.org, and MathML

I use MathML. Why? Because it just makes sense for mathematics on the websites.

On my DragonFly I had to do the following:

Installed X.org 6.8.1 or .2. Enable xfs (the X font server) by adding xfs_enable="YES" to rc.conf.

From ports install x11-fonts/ttmkfdir and x11-fonts/urwfonts-ttf.

Extract http://www.mozilla.org/projects/mathml/fonts/bakoma/texcm-ttf.zip to /usr/X11R6/lib/X11/fonts/TTF.

Extract from http://support.wolfram.com/mathematica/systems/windows/general/latestfonts.html the 4.1 TrueType fonts to /usr/X11R6/lib/X11/fonts/TTF.

In /usr/X11R6/lib/X11/fonts/TTF do:

# ttmkfdir > fonts.scale
# mkfontdir

This will update fonts.scale and fonts.dir, check them with cat or more to see if they contain references to the extracted new .ttf files.

Change /usr/X11R6/lib/X11/fs/config to have /usr/X11R6/lib/X11/fonts/urwfonts-ttf added to catalogue.
Also add /usr/X11R6/lib/X11/fonts/urwfonts-ttf as a FontPath to /etc/X11/xorg.conf.

# xset fp+ /usr/X11R6/lib/X11/fonts/urwfonts-ttf
# xset fp rehash

Edited $HOME/.fonts.conf and added: [xml]<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="pattern"> <test name="family"> <string>symbol</string> </test> <edit name="family" mode="append" binding="strong"> <string>Standard Symbols L</string> </edit> </match> </fontconfig>[/xml] Added user_pref("font.mathfont-family", "Math1, Math2, Math4"); to $HOME/.mozilla/firefox/<profile.default>/user.js.

There seem to be some bugs still, at least in displaying the W3C test suite.

# X can suck hard at times

And to the question why people still use Windows try setting up your X environment to properly support MathML with Firefox.

Truly, using new fonts within X is a black art still reminiscent of dark and medieval times when we did not know better. I thought we would have progressed that stage by now.

From a user perspective Windows definitely wins hands down in this, drag a file to a Fonts folder, done.
No, X wants us to use crazy incantations of mkfontdir, mkfontscale, fc-cache, ttmkfdir, xset with various fp options and hope xlsfonts shows the font you are after.

Users do NOT want to be bothered with foundries, weights, encoding types, and what not. They just want to add a font, select it in their favourite application and go: “owww, pretty!”

Is that, anno 2004, too much to ask?

Apparently…