home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / fontutils-0.6-base.tgz / fontutils-0.6-base.tar / fsf / fontutils / xbfe / char.h < prev    next >
C/C++ Source or Header  |  1992-03-27  |  2KB  |  63 lines

  1. /* char.h: declarations for handling TFM and bitmap characters simultaneously.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef CHAR_H
  20. #define CHAR_H
  21.  
  22. #include "font.h"
  23. #include "tfm.h"
  24. #include "types.h"
  25. #include "xt-common.h"
  26.  
  27.  
  28. /* The representation of a single character.  */
  29. typedef struct
  30. {
  31.   char_info_type bitmap_info;
  32.   tfm_char_type tfm_info;
  33. } char_type;
  34.  
  35. /* The bitmap-derived information about the character C.  */
  36. #define CHAR_BITMAP_INFO(c) ((c).bitmap_info)
  37. #define BCHAR_BB(c) CHAR_BB (CHAR_BITMAP_INFO (c))
  38. #define BCHAR_BITMAP(c) CHAR_BITMAP (CHAR_BITMAP_INFO (c))
  39. #define BCHAR_MAX_COL(c) MAX_COL (BCHAR_BB (c))
  40. #define BCHAR_MIN_COL(c) MIN_COL (BCHAR_BB (c))
  41. #define BCHAR_MAX_ROW(c) MAX_ROW (BCHAR_BB (c))
  42. #define BCHAR_MIN_ROW(c) MIN_ROW (BCHAR_BB (c))
  43. #define BCHAR_SET_WIDTH(c) CHAR_SET_WIDTH (CHAR_BITMAP_INFO (c))
  44. #define BCHAR_TFM_WIDTH(c) CHAR_TFM_WIDTH (CHAR_BITMAP_INFO (c))
  45.  
  46. /* The tfm-derived information about the character C.  */
  47. #define CHAR_TFM_INFO(c) ((c).tfm_info)
  48.  
  49.  
  50. /* This defines `font_type', which uses `char_type', so we can't include
  51.    it until now.  */
  52. #include "main.h"
  53.  
  54.  
  55. /* Return a pointer to the character CODE from the font F.  If the
  56.    character hasn't been read yet, call `font_read_char'.  */
  57. extern char_type *read_char (font_type f, charcode_type code);
  58.  
  59. /* Display the character C in the font F using the widgets below W.  */
  60. extern void show_char (Widget w, font_type *f, char_type *c);
  61.  
  62. #endif /* not CHAR_H */
  63.