comparison src/w32font.c @ 91259:51863d34f0f1

(w32font_open): Remove debug code. (w32font_match_internal, w32_font_open_internal): Remove experimental change. Last checkin should have had the following comment: (w32font_text_extents): Don't use the frame stored in the font, as it may have been deleted.
author Jason Rumney <jasonr@gnu.org>
date Wed, 19 Dec 2007 22:27:46 +0000
parents 5e8f33ad8f63
children 75f89f349f70
comparison
equal deleted inserted replaced
91258:5e8f33ad8f63 91259:51863d34f0f1
200 { 200 {
201 struct w32font_info *w32_font = xmalloc (sizeof (struct w32font_info)); 201 struct w32font_info *w32_font = xmalloc (sizeof (struct w32font_info));
202 202
203 if (w32_font == NULL) 203 if (w32_font == NULL)
204 return NULL; 204 return NULL;
205
206 safe_debug_print (font_entity);
207 205
208 if (!w32font_open_internal (f, font_entity, pixel_size, w32_font)) 206 if (!w32font_open_internal (f, font_entity, pixel_size, w32_font))
209 { 207 {
210 xfree (w32_font); 208 xfree (w32_font);
211 return NULL; 209 return NULL;
608 match_data.list = Qnil; 606 match_data.list = Qnil;
609 607
610 bzero (&match_data.pattern, sizeof (LOGFONT)); 608 bzero (&match_data.pattern, sizeof (LOGFONT));
611 fill_in_logfont (f, &match_data.pattern, font_spec); 609 fill_in_logfont (f, &match_data.pattern, font_spec);
612 610
613 /* If weight was not specified, try to get a normal weight font. */
614 if (!match_data.pattern.lfWeight)
615 match_data.pattern.lfWeight = FW_NORMAL;
616
617 match_data.opentype_only = opentype_only; 611 match_data.opentype_only = opentype_only;
618 if (opentype_only) 612 if (opentype_only)
619 match_data.pattern.lfOutPrecision = OUT_OUTLINE_PRECIS; 613 match_data.pattern.lfOutPrecision = OUT_OUTLINE_PRECIS;
620 614
621 dc = get_frame_dc (f); 615 dc = get_frame_dc (f);
647 if (!font) 641 if (!font)
648 return 0; 642 return 0;
649 643
650 bzero (&logfont, sizeof (logfont)); 644 bzero (&logfont, sizeof (logfont));
651 fill_in_logfont (f, &logfont, font_entity); 645 fill_in_logfont (f, &logfont, font_entity);
652
653 /* If weight was not specified, try to get a normal weight font. */
654 if (!logfont.lfWeight)
655 logfont.lfWeight = FW_NORMAL;
656 646
657 size = XINT (AREF (font_entity, FONT_SIZE_INDEX)); 647 size = XINT (AREF (font_entity, FONT_SIZE_INDEX));
658 if (!size) 648 if (!size)
659 size = pixel_size; 649 size = pixel_size;
660 650