Changeset 4152

Show
Ignore:
Timestamp:
2006年08月29日 21時55分51秒 (2 years ago)
Author:
miyoshi
Message:

* xfaces.c (clear_font_table): Call w32_unload_font().
(set_font_frame_param): Activate invalidated function.

* mw32font.c (w32_unload_font): New function.
(set_font_frame_param): Moved to xfaces.c.

* dispextern.h (struct glyph_string): Don't use MW32LogicalFont.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r4151 r4152  
     12006-08-29  MIYOSHI Masanori  <miyoshi@meadowy.org> 
     2 
     3        * xfaces.c (clear_font_table): Call w32_unload_font(). 
     4        (set_font_frame_param): Activate invalidated function. 
     5 
     6        * mw32font.c (w32_unload_font): New function. 
     7        (set_font_frame_param): Moved to xfaces.c. 
     8 
     9        * dispextern.h (struct glyph_string): Don't use MW32LogicalFont. 
     10 
    1112006-08-26  YAMAZAKI Katsuhiro  <yamazaki-k@mwe.biglobe.ne.jp> 
    212 
  • trunk/src/dispextern.h

    r4119 r4152  
    11651165 
    11661166  /* Font in which this string is to be drawn.  */ 
    1167 #ifdef MEADOW 
    1168   MW32LogicalFont *font; 
    1169 #else 
    11701167  XFontStruct *font; 
    1171 #endif 
    11721168 
    11731169  /* Font info for this string.  */ 
  • trunk/src/mw32font.c

    r4120 r4152  
    728728} 
    729729 
    730 #if 0 
    731730void 
    732 w32_unload_font (struct frame *f, FONT_TYPE *font) 
    733 
    734 #if 0 
    735   HFONT hf; 
    736   hf = MWF_GET_FONT (font->fs_font, font->property_index); 
    737  
    738   if (hf) 
    739     { 
    740       DeleteObject (*phf); 
    741       *phf = NULL; 
    742     } 
    743 #endif 
    744   xfree (font); 
    745  
    746   return; 
    747 
    748 #endif 
     731w32_unload_font (struct mw32_display_info *dpyinfo, MW32LogicalFont *font) 
     732
     733  mw32_delete_logical_font (font); 
     734
    749735 
    750736static void 
     
    22262212} 
    22272213 
    2228 /* Set the `font' frame parameter of FRAME determined from `default' 
    2229    face attributes LFACE.  If a face or fontset name is explicitely 
    2230    specfied in LFACE, use it as is.  Otherwise, determine a font name 
    2231    from the other font-related atrributes of LFACE.  In that case, if 
    2232    there's no matching font, signals an error.  */ 
    2233 /* For MW32 implementation, we don't call choose_face_font () to obtain 
    2234    the default font name.  */ 
    2235  
    2236 void set_font_frame_param (Lisp_Object frame, Lisp_Object lface) 
    2237 { 
    2238   struct frame *f = XFRAME (frame); 
    2239  
    2240   if (FRAME_WINDOW_P (f)) 
    2241     { 
    2242       Lisp_Object font_name; 
    2243       char *font; 
    2244  
    2245       if (STRINGP (LFACE_FONT (lface))) 
    2246         { 
    2247           font_name = LFACE_FONT (lface); 
    2248           f->default_face_done_p = 0; 
    2249           Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), 
    2250                                                   Qnil)); 
    2251         } 
    2252     } 
    2253 } 
    2254  
    22552214  
    22562215/*********************************************************************** 
  • trunk/src/xfaces.c

    r4140 r4152  
    487487static Lisp_Object resolve_face_name P_ ((Lisp_Object, int)); 
    488488static int may_use_scalable_font_p P_ ((const char *)); 
    489 #ifndef MEADOW 
    490489static void set_font_frame_param P_ ((Lisp_Object, Lisp_Object)); 
    491 #endif 
    492490static int better_font_p P_ ((int *, struct font_name *, struct font_name *, 
    493491                              int, int)); 
     
    597595extern Lisp_Object mw32_list_fonts P_ ((struct frame *, Lisp_Object, int, 
    598596                                        int)); 
    599                                          
    600 extern Lisp_Object display_x_get_resource P_ ((Display_Info *, Lisp_Object,  
     597extern Lisp_Object display_x_get_resource P_ ((Display_Info *, Lisp_Object, 
    601598                                               Lisp_Object, Lisp_Object, 
    602599                                               Lisp_Object)); 
     
    11031100      XFreeFont (dpyinfo->display, font_info->font); 
    11041101#endif 
    1105 #ifdef MEADOW 
    1106       { 
    1107         MW32LogicalFont *plf = (MW32LogicalFont*) font_info->font; 
    1108         mw32_delete_logical_font (plf); 
    1109       } 
    1110 #else 
    11111102#ifdef WINDOWSNT 
    11121103      w32_unload_font (dpyinfo, font_info->font); 
    1113 #endif 
    11141104#endif 
    11151105#ifdef MAC_OS 
     
    45234513#ifdef HAVE_WINDOW_SYSTEM 
    45244514 
    4525 #ifndef MEADOW 
    45264515/* Set the `font' frame parameter of FRAME determined from `default' 
    45274516   face attributes LFACE.  If a face or fontset name is explicitely 
     
    45454534      else 
    45464535        { 
     4536#ifdef MEADOW 
     4537          return; 
     4538#else /* not MEADOW */ 
    45474539          /* Choose a font name that reflects LFACE's attributes and has 
    45484540             the registry and encoding pattern specified in the default 
     
    45534545          font_name = build_string (font); 
    45544546          xfree (font); 
     4547#endif /* not MEADOW */ 
    45554548        } 
    45564549 
     
    45594552    } 
    45604553} 
    4561 #endif /* not MEADOW */ 
    45624554 
    45634555/* Update the corresponding face when frame parameter PARAM on frame F