Re: GTK+3 fonts
- From: Roger Davis <rbd soest hawaii edu>
- To: Liam R E Quin <liam holoweb net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK+3 fonts
- Date: Sun, 21 Oct 2012 00:16:31 -1000 (HST)
Hi Liam,
Thanks for explaining the Sans alias. I was wondering about that, as
looking around on my CentOS 6 system I was able to find most of the Gnome
fonts in /usr/share/fonts (including the DejaVu fonts), but was not able
to find the Sans font anywhere. Playing around with the gnome-terminal
profiles font selection dialog, it appears that Sans is an alias for
DejaVu Sans Book.
Digging a little deeper, I am noticing a number of bewildering differences
between my CentOS 6 and Mac systems with regard to this font problem,
however, and it's not at all clear why the differences exist, partly
because (i) my CentOS system is basically a Gnome 2 environment to which I
have added GTK+3 and related (i.e., up-to-date glib, cairo, etc.)
libraries, and (ii) although I don't think that my Mac is similarly
polluted with any Gnome 2 packages (as I only installed the MacPorts gtk3
atop the base MacOS), it probably does not have anywhere close to a full
set of Gnome fonts of any vintage.
I have a test drawing program (that calls the Cairo font selection and
text drawing routines) which allows me to specify a font and fontsize and
some arbitrary text. On CentOS, when I use DejaVu Sans and gradually
decrement the size from about 24 down to 14, for instance, the rendered
text all looks basically the same, just smaller as one would expect.
Running the same test code on the Mac, however, when I move from 17 to 16
using DejaVu Sans, the text actually changes markedly in appearance to
something that looks more like DejaVu Sans ExtraLight at the smaller size.
Also, a certain UTF-8 character ("\342\206\220", a left arrow) that
renders just fine on CentOS with DejaVu Sans does not render at all on Mac
OS, even at the larger font sizes which look more similar to the CentOS
DejaVu Sans. (This character instead renders as a small boxed rectangle
around a blank space, which I interpret to mean that the font does not
support that particular UTF-8 value.)
Finally, I can't seem to locate the Gnome fonts anywhere on my Mac,
although when I use my test program to draw with certain fonts (Courier 10
Pitch, Nimbus Mono L) cairo seems to find something reasonable. Under
CentOS they are in /usr/share/fonts (although this is probably their Gnome
2 location, I have no idea where a full Gnome 3 installation would put
them). On my Mac, however, I did a find (Unix shell command) search and
the only DejaVu files I could locate were in
/Applications/OpenOffice.org.app/Contents/basis-link/share/fonts/truetype/DejaVuSans.ttf
which seem to be part of the OpenOffice package and not part of any
installed Gnome fonts.
Any explanation for these mysteries, or any pointers to some decent
documentation on Gnome 2/3 font configuration and installation?
Thanks!
Roger
On Sun, 21 Oct 2012, Liam R E Quin wrote:
On Sat, 2012-10-20 at 20:23 -1000, Roger Davis wrote:
Hi all,
I [...] am partial to the Sans font for various reasons.
On most linux systems this is actually an alias, not a font name.
Here, it's DejaVu Sans Book:
$ fc-match Sans
DejaVuSans.ttf: "DejaVu Sans" "Book"
$
so, add DejaVuSans.ttf to your Mac.
Liam
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]