unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 31702@debbugs.gnu.org
Subject: bug#31702:
Date: Mon, 4 Jun 2018 20:02:33 -0300	[thread overview]
Message-ID: <CAELgYhcfLobGc=L2m--7ghPsTJhX3gc0wn3ASPxoiOaPYn1ZCw@mail.gmail.com> (raw)
In-Reply-To: <87tvqjp7lj.fsf@carlos.i-did-not-set--mail-host-address--so-tickle-me>

I noticed another weird behavior (but it's not emacs fault as explained below).

Hack:size=11 looks very different of "Hack 11" or Hack-11. In fact
"Hack 11" is more like Hack:size=15.

The fontconfig documentation states that the size property is a double
which specifies the size in points, but then it's ambiguous when
stating how the size is encoded in a descriptor. The general
descriptor format is:

<families>-<point sizes>:<name1>=<values1>:<name2>=<values2>...

where <nameX> can be "size". So there seems to be two equivalent ways
of specifying a size in points: Hack-11 and Hack:size=11.

But by trial and error I found out that when part of the name-value
list, the size property is synonymous with the pixelsize property.

So the right way to specify a point size is, in my example, Hack-11.

Now, I was concerned about missing some font sizes, since emacs is
rounding sizes in a different way than gtk or whatever is the desktop
using. But my concern was unfounded. To be sure, emacs' Hack-10 is
desktop's Hack-10 and emacs' Hack-11 is desktop's Hack-12, so there is
a gap there. Of course, this is no big deal when setting the font from
inside emacs, since I'm able to set the size with tenth-of-point
precision: instead of 110 I just set 109 to get desktop's Hack-11. But
TIL that from resources file I'm able to set double valued sizes, so
Hack-10.9 also does the trick.

:)

From my very limited experiments, it seems to be that emacs is
rounding sizes to the nearest available one while the desktop is
always rounding them down. Perhaps is a bit impolite from the part of
emacs to behave like that in a desktop environment but its behavior is
both internally consistent and more accurate. I feel inclined to close
this issue (and maybe to add an entry to the wiki explaining this font
sizing border case).





      parent reply	other threads:[~2018-06-04 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04  3:13 bug#31702: 26.1; Effective font height is different from set value Carlos Piat
2018-06-04  3:48 ` bug#31702: Carlos Pita
2018-06-04 17:27 ` bug#31702: Carlos Pita
2018-06-04 18:25   ` bug#31702: Carlos Pita
2018-06-04 19:11     ` bug#31702: Eli Zaretskii
2019-11-02  1:10       ` bug#31702: Stefan Kangas
2018-06-04 23:02 ` Carlos Pita [this message]

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='CAELgYhcfLobGc=L2m--7ghPsTJhX3gc0wn3ASPxoiOaPYn1ZCw@mail.gmail.com' \
    --to=carlosjosepita@gmail.com \
    --cc=31702@debbugs.gnu.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).