/TeXmacs-1.0.7.11-src/src/Plugins/Metafont/load_tfm.hpp

# · C++ Header · 76 lines · 52 code · 14 blank · 10 comment · 0 complexity · 094ba5ae8ce3379371e6fed897d30cc7 MD5 · raw file

  1. /******************************************************************************
  2. * MODULE : load_tfm.h
  3. * DESCRIPTION: load TeX font metric file
  4. * COPYRIGHT : (C) 1999 Joris van der Hoeven
  5. *******************************************************************************
  6. * This software falls under the GNU general public license version 3 or later.
  7. * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
  8. * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
  9. ******************************************************************************/
  10. #ifndef LOAD_TFM_H
  11. #define LOAD_TFM_H
  12. #include "file.hpp"
  13. #include "tex_files.hpp"
  14. #include "resource.hpp"
  15. #include "bitmap_font.hpp"
  16. RESOURCE(tex_font_metric);
  17. struct tex_font_metric_rep: rep<tex_font_metric> {
  18. HN lf, lh, bc, ec;
  19. HN nw, nh, nd, ni;
  20. HN nl, nk, ne, np;
  21. SI* header;
  22. SI* char_info;
  23. SI* width;
  24. SI* height;
  25. SI* depth;
  26. SI* italic;
  27. SI* lig_kern;
  28. SI* kern;
  29. SI* exten;
  30. SI* param;
  31. SI left , right;
  32. SI left_prog, right_prog;
  33. int size; // original size (needed to compute magnification of pk font)
  34. /***************************************************************************/
  35. tex_font_metric_rep (string name);
  36. ~tex_font_metric_rep ();
  37. SI w (QN c);
  38. SI h (QN c);
  39. SI d (QN c);
  40. SI i (QN c);
  41. SI tag (QN c);
  42. SI rem (QN c);
  43. int list_len (QN c);
  44. QN nth_in_list (QN c, int n);
  45. QN top (QN c);
  46. QN mid (QN c);
  47. QN bot (QN c);
  48. QN rep (QN c);
  49. SI design_size ();
  50. double slope ();
  51. SI spc ();
  52. SI spc_stretch ();
  53. SI spc_shrink ();
  54. SI x_height ();
  55. SI spc_quad ();
  56. SI spc_extra ();
  57. SI parameter (int i);
  58. void execute (SI* s, int n, SI* buf, SI* ker, int& m);
  59. void get_xpositions (int* s, int n, double unit, SI* xpos);
  60. };
  61. tex_font_metric load_tfm (url file_name, string family, int size);
  62. #endif // defined LOAD_TFM_H