unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Default font has size 12pixels when requested 13pixels
@ 2008-02-15 20:48 Stefan Monnier
  2008-02-15 21:40 ` Jason Rumney
  2008-02-18 18:30 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2008-02-15 20:48 UTC (permalink / raw)
  To: emacs-devel


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




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-19 22:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 20:48 Default font has size 12pixels when requested 13pixels Stefan Monnier
2008-02-15 21:40 ` 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

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).