home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel0_89.lha / Feel / AddOns / yyfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-13  |  3.1 KB  |  96 lines

  1. /* Header File for Font Handling
  2.  * This file is part of YY-server of YYonX (1.3 Distribution)
  3.  * $Id: yyfont.h,v 1.1 1993/01/18 12:57:24 pab Exp $
  4.  */
  5.  
  6. /****************************************************************************
  7. ;;;
  8. ;;;  Copyright (C) 1989,1990,1991 Aoyama Gakuin University
  9. ;;;
  10. ;;;        All Rights Reserved
  11. ;;;
  12. ;;; This software is developed for the YY project of Aoyama Gakuin University.
  13. ;;; Permission to use, copy, modify, and distribute this software
  14. ;;; and its documentation for any purpose and without fee is hereby granted,
  15. ;;; provided that the above copyright notices appear in all copies and that
  16. ;;; both that copyright notice and this permission notice appear in 
  17. ;;; supporting documentation, and that the name of Aoyama Gakuin
  18. ;;; not be used in advertising or publicity pertaining to distribution of
  19. ;;; the software without specific, written prior permission.
  20. ;;;
  21. ;;; This software is made available AS IS, and Aoyama Gakuin makes no
  22. ;;; warranty about the software, its performance or its conformity to
  23. ;;; any specification. 
  24. ;;;
  25. ;;; To make a contact: Send E-mail to ida@csrl.aoyama.ac.jp for overall
  26. ;;; issues. To ask specific questions, send to the individual authors at
  27. ;;; csrl.aoyama.ac.jp. To request a mailing list, send E-mail to 
  28. ;;; yyonx-request@csrl.aoyama.ac.jp.
  29. ;;;
  30. ;;; Authors:
  31. ;;;   Version 1.0 90/08/26 by Keisuke 'Keiko' Tanaka
  32. ;;;                (keisuke@csrl.aoyama.ac.jp)
  33. ;;;   Version 2.0 90/08/27 by Keisuke 'Keiko' Tanaka
  34. ;;;            Page Mode Territory is supported
  35. ;;;   Version 2.2 90/11/05 by Keisuke 'Keiko' Tanaka
  36. ;;;            Copyright Notice is rewritten
  37. ;;;
  38. ****************************************************************************/
  39.  
  40. /****************************************************************************
  41.   $Revision: 1.1 $ Written by Keisuke 'Keiko' Tanaka
  42.   $Date: 1993/01/18 12:57:24 $
  43. ****************************************************************************/
  44.  
  45. struct _yy_char_info {
  46.     int ciAscent;
  47.     int ciDescent;
  48.     int ciHeight;
  49.     int ciWidth;
  50.     int ciRBearing;
  51.     int ciLBearing;
  52. } ;
  53. typedef struct _yy_char_info    YYCHAR;
  54.  
  55. struct _yy_font_x_table {
  56.     struct _yy_font_x_info {
  57.     Font fxFontID;
  58.     char *fxFontName;
  59.     YYCHAR fxMaxBound;
  60.     YYCHAR fxMinBound;
  61.     XFontStruct *fxFontStruct;
  62.     } fxFontInfo;
  63.     struct _yy_font_x_table *fxNext;
  64. } ;
  65. typedef struct _yy_font_x_table    yy_font_x_table;
  66. typedef struct _yy_font_x_info    YYXFONT;
  67.  
  68. struct _yy_font_table {
  69.     struct _yy_font_info {
  70.     bool fiLoaded;
  71.     int fiFID;
  72.     char *fiFontName;
  73.     YYCHAR fiMaxBound;
  74.     YYCHAR fiMinBound;
  75.     YYXFONT *fiSingle;
  76.     YYXFONT *fiDouble;
  77.     } yfFontInfo;
  78.     struct _yy_font_table *yfNext;
  79. } ;
  80.  
  81. #define MAXB1ASCENT(yfont)    ((yfont)->fiSingle->fxMaxBound.ciAscent)
  82. #define MAXB2ASCENT(yfont)    ((yfont)->fiDouble->fxMaxBound.ciAscent)
  83. #define MAXB1DESCENT(yfont)    ((yfont)->fiSingle->fxMaxBound.ciDescent)
  84. #define MAXB2DESCENT(yfont)    ((yfont)->fiDouble->fxMaxBound.ciDescent)
  85.  
  86. struct _text_box_entry {
  87.     int x, y;    /* Left Top */
  88.     int w, h;    /* Width and Height */
  89. } ;
  90. typedef struct _text_box_entry    TEXTBOX;
  91.  
  92. extern YYFONT *call_font();
  93. extern TEXTBOX *YYTextSize();
  94. extern int YYTextWidth();
  95. extern void do_draw_text_on_page();
  96.