From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Parsing of fontconfig font names and other font related stuff.
Date: Wed, 08 Jul 2009 14:09:30 +0200 [thread overview]
Message-ID: <4A548C7A.5020309@swipnet.se> (raw)
In-Reply-To: <4A545A85.2060803@swipnet.se>
Jan Djärv skrev:
> Kenichi Handa skrev:
>> And, I don't know what dpi is for. That information should
>> be available via X server. Is it a way to pretend that you
>> are using a screen of the different DPI?
>
> Yes. Gnome has 96 dpi as default (settable in a user desktop settings
> dialog), fontconfig seems to have 75. My monitor is actually 84 dpi.
> Other applications in Gnome, like gnome-terminal, uses the 96 dpi value,
> but Emacs uses the default. That makes Emacs and gnome-terminal look
> different even though they both use monospace-8.
Actually it is too late to add DPI in xftfont.c, because it must be added long
before that. Font.c does DPI calculations all over the place, and assumes
that either dpi=... is given in the font spec, or that the DPI for the monitor
can be used. In fact, it is either 75 (fontconfig default) or 96 (GNOME
default) that is used, so font.c is wrong (wrong == different from other
applications) when a plain font name like monospace-8 is given.
It would be nice to be able to use XftDefaultSubstitute to pick up the GConf
settings from the X database (GConf puts them there). But by the time the Xft
driver has been choosen, the pixel size for the font has already been
calculated, using another dpi-value.
How can we fix this? Can we choose driver without calculating a pixel size?
The fast but kind of ugly way would be to add the defaults from
XftDefaultSubstitute to the name if it is an fcname and Xft is present.
Jan D.
next prev parent reply other threads:[~2009-07-08 12:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 18:57 Parsing of fontconfig font names and other font related stuff Jan Djärv
2009-07-08 0:55 ` Kenichi Handa
2009-07-08 8:36 ` Jan Djärv
2009-07-08 11:27 ` Jason Rumney
2009-07-08 11:34 ` Kenichi Handa
2009-07-08 12:01 ` Jason Rumney
2009-07-08 12:09 ` Jan Djärv [this message]
2009-07-08 12:36 ` Kenichi Handa
2009-07-08 13:43 ` Miles Bader
2009-07-08 14:29 ` Jan Djärv
2009-07-08 22:54 ` Miles Bader
2009-07-08 14:07 ` Jan Djärv
2009-07-08 7:12 ` Yavor Doganov
2009-07-08 8:56 ` Jan Djärv
2009-07-08 10:01 ` Yavor Doganov
2009-07-08 11:42 ` Jan Djärv
2009-07-08 13:12 ` Yavor Doganov
2009-07-14 14:55 ` Jan Djärv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A548C7A.5020309@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
--cc=handa@m17n.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).