/[emacs]/emacs/src/w32fns.c
ViewVC logotype

Diff of /emacs/src/w32fns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.245 by jasonr, Tue Nov 2 08:55:10 2004 UTC revision 1.246 by jasonr, Mon Jan 3 22:53:30 2005 UTC
# Line 64  extern double atof (); Line 64  extern double atof ();
64  extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object));  extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object));
65  extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT));  extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT));
66  extern void w32_free_menu_strings P_ ((HWND));  extern void w32_free_menu_strings P_ ((HWND));
67    extern XCharStruct *w32_per_char_metric P_ ((XFontStruct *, wchar_t *, int));
68    
69  extern int quit_char;  extern int quit_char;
70    
# Line 4544  w32_load_system_font (f,fontname,size) Line 4545  w32_load_system_font (f,fontname,size)
4545          /* Fill out details in lf according to the font that was          /* Fill out details in lf according to the font that was
4546             actually loaded.  */             actually loaded.  */
4547          lf.lfHeight = font->tm.tmInternalLeading - font->tm.tmHeight;          lf.lfHeight = font->tm.tmInternalLeading - font->tm.tmHeight;
4548          lf.lfWidth = font->tm.tmAveCharWidth;          lf.lfWidth = font->tm.tmMaxCharWidth;
4549          lf.lfWeight = font->tm.tmWeight;          lf.lfWeight = font->tm.tmWeight;
4550          lf.lfItalic = font->tm.tmItalic;          lf.lfItalic = font->tm.tmItalic;
4551          lf.lfCharSet = font->tm.tmCharSet;          lf.lfCharSet = font->tm.tmCharSet;
# Line 4592  w32_load_system_font (f,fontname,size) Line 4593  w32_load_system_font (f,fontname,size)
4593      fontp->name = (char *) xmalloc (strlen (fontname) + 1);      fontp->name = (char *) xmalloc (strlen (fontname) + 1);
4594      bcopy (fontname, fontp->name, strlen (fontname) + 1);      bcopy (fontname, fontp->name, strlen (fontname) + 1);
4595    
4596        if (lf.lfPitchAndFamily == FIXED_PITCH)
4597          {
4598            /* Fixed width font.  */
4599            fontp->average_width = fontp->space_width = FONT_WIDTH (font);
4600          }
4601        else
4602          {
4603            wchar_t space = 32;
4604            XCharStruct* pcm;
4605            pcm = w32_per_char_metric (font, &space, ANSI_FONT);
4606            if (pcm)
4607              fontp->space_width = pcm->width;
4608            else
4609              fontp->space_width = FONT_WIDTH (font);
4610    
4611            fontp->average_width = font->tm.tmAveCharWidth;
4612          }
4613    
4614      charset = xlfd_charset_of_font (fontname);      charset = xlfd_charset_of_font (fontname);
4615    
4616    /* Cache the W32 codepage for a font.  This makes w32_encode_char    /* Cache the W32 codepage for a font.  This makes w32_encode_char

Legend:
Removed from v.1.245  
changed lines
  Added in v.1.246

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26