home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / epoch / tek-highlight-2.0 / get-font.patch < prev    next >
Encoding:
Text File  |  1992-08-20  |  942 b   |  36 lines

  1. *** ../../epoch-3.2.2/src/xutil.c    Fri Jul 19 09:36:33 1991
  2. --- xutil.c    Fri Aug 23 16:31:07 1991
  3. ***************
  4. *** 566,571 ****
  5. --- 566,573 ----
  6.   {
  7.     Font font;
  8.     BLOCK_INPUT_DECLARE();
  9. +   char **tempfontlist;
  10. +   int tempfontcount;
  11.   
  12.     if (XRESOURCEP(name) && XXRESOURCE(name)->type == XA_FONT) return name;
  13.   
  14. ***************
  15. *** 572,578 ****
  16.     CHECK_STRING(name,0);
  17.   
  18.     BLOCK_INPUT();
  19. !   font = XLoadFont(XD_display,XSTRING(name)->data);
  20.     UNBLOCK_INPUT();
  21.   
  22.     return font ? make_Xresource(XD_display,XD_plane,font,XA_FONT) : Qnil;
  23. --- 574,585 ----
  24.     CHECK_STRING(name,0);
  25.   
  26.     BLOCK_INPUT();
  27. !   tempfontlist = XListFonts(XD_display,XSTRING(name)->data,1,&tempfontcount);
  28. !   if (tempfontcount)
  29. !       font = XLoadFont(XD_display,XSTRING(name)->data);
  30. !   else
  31. !       font = 0;
  32. !   XFreeFontNames(tempfontlist);
  33.     UNBLOCK_INPUT();
  34.   
  35.     return font ? make_Xresource(XD_display,XD_plane,font,XA_FONT) : Qnil;
  36.