all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Default font has size 12pixels when requested 13pixels
Date: Fri, 15 Feb 2008 15:48:21 -0500	[thread overview]
Message-ID: <jwvy79mkl7m.fsf-monnier+emacs@gnu.org> (raw)


My default font is specified via X resources:

Emacs.font:     -misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-*

yet with the new font-backend, I get the 12-pixel version of that font
(which happens to be a *lot* smaller).

I'm trying to track down what's going on, but am having some trouble.
I see the point-size of my faces going from 99 (corresponding to the
desired 13 pixels) to 91 (corresponding to 12 pixels) at some point, but
still can't quite figure out where that happens.

I run Emacs, placing a breakpoint on realize_default_face, and the
second call to that function seems to be the culprit.

One troubling spot comes up as follows: during this second call, when
the function calls font_find_object (around xfaces.c:7469) I see that
the returned frame_font has the following content:

   (gdb) p frame_font
   $182 = {
     i = 1754152016, 
     s = {
       val = 143539280, 
       type = Lisp_Misc
     }, 
     u = {
       val = 143539280, 
       type = Lisp_Misc
     }
   }
   (gdb) xsavevalue 
   $183 = (struct Lisp_Save_Value *) 0x88e3c50
   (gdb) p *$183
   $184 = {
     type = Lisp_Misc_Save_Value, 
     gcmarkbit = 0, 
     spacer = 0, 
     dogc = 0, 
     pointer = 0x9191a20, 
     integer = 1
   }
   (gdb) p *(struct font*)$183->pointer
   $185 = {
     font = {
       font = 0x9191080, 
       font_idx = 152641048, 
       name = 0x9191e20 "-misc-fixed-medium-r-semicondensed--*-*-75-75-c-60-koi8-r", 
       full_name = 0x9194b80 "-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-KOI8-R", 
       charset = 73, 
       size = 6, 
       height = 12, 
       space_width = 6, 
       average_width = 6, 
       vertical_centering = 0, 
       encoding_type = 128 '\200', 
       baseline_offset = 0, 
       relative_compose = 0, 
       default_ascent = 0, 
       font_encoder = 0x40
     }, 
     entity = {
       i = 2831330056, 
       s = {
         val = 146975496, 
         type = Lisp_Vectorlike
       }, 
       u = {
         val = 146975496, 
         type = Lisp_Vectorlike
       }
     }, 
     pixel_size = 13, 
     driver = 0x8891f60, 
     format = {
       i = 1217384936, 
       s = {
         val = 143643112, 
         type = Lisp_Symbol
       }, 
       u = {
         val = 143643112, 
         type = Lisp_Symbol
       }
     }, 
     file_name = 0x0, 
     encoding_charset = 73, 
     repertory_charset = 73, 
     min_width = 6, 
     ascent = 10, 
     descent = 2, 
     scalable = 0
   }
   (gdb) 

Of course I have no idea where this
"-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-KOI8-R", and
interestingly this "struct font" says both that its height is 12
(presumably pixels) and that it has pixel size 13.

Can anybody give me a hand here?


        Stefan




             reply	other threads:[~2008-02-15 20:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15 20:48 Stefan Monnier [this message]
2008-02-15 21:40 ` Default font has size 12pixels when requested 13pixels Jason Rumney
2008-02-16  0:42   ` Glenn Morris
2008-02-18 18:30 ` Stefan Monnier
2008-02-19  8:04   ` Kenichi Handa
2008-02-19  9:19     ` Jason Rumney
2008-02-19 12:48       ` Kenichi Handa
2008-02-19 20:00     ` Glenn Morris
2008-02-19 22:51       ` Jason Rumney
2008-02-19 22:53         ` Glenn Morris

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy79mkl7m.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.