emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Default font has size 12pixels when requested 13pixels


From: Stefan Monnier
Subject: Default font has size 12pixels when requested 13pixels
Date: Fri, 15 Feb 2008 15:48:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]