[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font selection weirdness
From: |
Juanma Barranquero |
Subject: |
Re: Font selection weirdness |
Date: |
Thu, 29 May 2008 13:00:23 +0200 |
On Mon, May 26, 2008 at 2:36 PM, Jason Rumney <address@hidden> wrote:
> To see why the error is occuring, set a breakpoint on clear_cached_metrics
> and when it is hit, go back up the stack (in gdb: frame 1) to see what
> function it has failed from. Then get information such as the return code of
> the failing function, the character or glyph code that it is failing on, and
> the font, tyo help diagnose why it has failed.
I'm getting this backtrace (the build is optimized; I'll rebuild if needed):
#1 0x01202aa0 in clear_cached_metrics (w32_font=0x1f93300) at w32font.c:1899
#2 0x012072c0 in w32font_text_extents (font=0x1f93300, code=0x82deb0,
nglyphs=1, metrics=0x142fdb8) at w32font.c:1885
#3 0x01024116 in get_per_char_metric (f=0x190cc00, font=0x1f93300,
char2b=0x82dfd6) at xdisp.c:19453
#4 0x0104c538 in x_produce_glyphs (it=0x82e0c4) at xdisp.c:21000
#5 0x0103a5bd in display_line (it=0x82e0c4) at xdisp.c:16295
#6 0x0103e954 in try_window (window=40862212, pos={charpos = 1,
bytepos = 1}, check_margins=1) at xdisp.c:13832
#7 0x01052be7 in redisplay_window (window=40862212,
just_this_one_p=0) at xdisp.c:13450
#8 0x01054ca1 in redisplay_window_0 (window=40862212) at xdisp.c:12041
#9 0x01018c51 in internal_condition_case_1 (bfun=0x1054c7e
<redisplay_window_0>, arg=40862212, handlers=25687301,
hfun=0x1023c5a <redisplay_window_error>) at eval.c:1554
#10 0x0102d71d in redisplay_windows (window=33108736) at xdisp.c:12020
#11 0x010461ed in redisplay_internal (preserve_echo_area=1) at xdisp.c:11586
#12 0x01088249 in read_char (commandflag=1, nmaps=3, maps=0x82fb70,
prev_event=25704449, used_mouse_menu=0x82fc34,
end_time=0x0) at keyboard.c:2685
#13 0x0108c89a in read_key_sequence (keybuf=0x82fcd4, bufsize=30,
prompt=25704449, dont_downcase_last=0,
can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9443
#14 0x0108fa0d in command_loop_1 () at keyboard.c:1651
#15 0x01018ed6 in internal_condition_case (bfun=0x108f77f
<command_loop_1>, handlers=25768129,
hfun=0x10869e6 <cmd_error>) at eval.c:1506
#16 0x01085cef in command_loop_2 () at keyboard.c:1367
#17 0x01018f80 in internal_catch (tag=25764201, func=0x1085ccc
<command_loop_2>, arg=25704449) at eval.c:1242
#18 0x0108682b in command_loop () at keyboard.c:1346
#19 0x01086b7f in recursive_edit_1 () at keyboard.c:955
#20 0x01086cea in Frecursive_edit () at keyboard.c:1017
#21 0x01002c3c in main (argc=8585136, argv=0xa941f8) at emacs.c:1770
So the clear_cached_metrics call that triggers is the one in
compute_metrics (which has been optimized away).
In frame 1, w32_font has
$14 = {
font = {
size = 1075838994,
next = 0x2071440,
props = {25990081, 25992433, 30970217, 25992313, 31041897, 205440,
205056, 205312, 104, 25704449, 0, 25704449,
49267133, 49267181, 31652435, 31652419, 25704449, 31041969},
max_width = 14,
pixel_size = 13,
height = 17,
space_width = 7,
average_width = 7,
min_width = 7,
ascent = 13,
descent = 4,
underline_thickness = 1,
underline_position = 1,
vertical_centering = 0,
encoding_type = 0 '\0',
baseline_offset = 0,
relative_compose = 0,
default_ascent = 13,
font_encoder = 0x0,
driver = 0x137d2c0,
encoding_charset = -1,
repertory_charset = -1
},
metrics = {
tmHeight = 17,
tmAscent = 13,
tmDescent = 4,
tmInternalLeading = 4,
tmExternalLeading = 0,
tmAveCharWidth = 7,
tmMaxCharWidth = 14,
tmWeight = 400,
tmOverhang = 0,
tmDigitizedAspectX = 1001,
tmDigitizedAspectY = 1001,
tmFirstChar = 32 ' ',
tmLastChar = 255 '\377',
tmDefaultChar = 32 ' ',
tmBreakChar = 32 ' ',
tmItalic = 0 '\0',
tmUnderlined = 0 '\0',
tmStruckOut = 0 '\0',
tmPitchAndFamily = 91 '[',
tmCharSet = 2 '\002'
},
glyph_idx = 0,
cached_metrics = 0x1aaa600,
n_cache_blocks = 69,
compat_w32_font = 0x2f09400
}
where the props are
type: gdi
foundry: outline
family: Symbol
additional style: decorative
registry: ms-symbol
weight: 25680
slant: 25632
width: 25664
size: 13
dpi: nil
spacing: 0
average width: nil
extra: ((:format . type1))
font objects: (#<font-object
"-outline-Symbol-normal-normal-normal-decorative-13-*-*-*-p-*-ms-symbol">)
name: "-outline-Symbol-normal-normal-normal-decorative-13-*-*-*-p-*-ms-symbol"
full name: "Symbol-10.0"
file: nil
format: type1
A weird thing: w32_font->font.glyph_index is 16 when entering
compute_metrics, however code = 8704 (U+2200), which is not a glyph.
Is that correct?
The call to GetGlyphOutlineW returns GDI_ERROR, but GetLastError () == 0.
Do you need additional info?
Juanma
Re: Font selection weirdness,
Juanma Barranquero <=