Back to index

texmacs  1.0.7.15
load_tfm.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : load_tfm.h
00004 * DESCRIPTION: load TeX font metric file
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef LOAD_TFM_H
00013 #define LOAD_TFM_H
00014 #include "file.hpp"
00015 #include "tex_files.hpp"
00016 #include "resource.hpp"
00017 #include "bitmap_font.hpp"
00018 
00019 RESOURCE(tex_font_metric);
00020 
00021 struct tex_font_metric_rep: rep<tex_font_metric> {
00022   HN      lf, lh, bc, ec;
00023   HN      nw, nh, nd, ni;
00024   HN      nl, nk, ne, np;
00025 
00026   SI*     header;
00027   SI*     char_info;
00028   SI*     width;
00029   SI*     height;
00030   SI*     depth;
00031   SI*     italic;
00032   SI*     lig_kern;
00033   SI*     kern;
00034   SI*     exten;
00035   SI*     param;
00036 
00037   SI      left     , right;
00038   SI      left_prog, right_prog;
00039 
00040   int     size; // original size (needed to compute magnification of pk font)
00041 
00042   /***************************************************************************/
00043 
00044   tex_font_metric_rep (string name);
00045   ~tex_font_metric_rep ();
00046 
00047   SI      w (QN c);
00048   SI      h (QN c);
00049   SI      d (QN c);
00050   SI      i (QN c);
00051   SI      tag (QN c);
00052   SI      rem (QN c);
00053   int     list_len (QN c);
00054   QN      nth_in_list (QN c, int n);
00055   QN      top (QN c);
00056   QN      mid (QN c);
00057   QN      bot (QN c);
00058   QN      rep (QN c);
00059 
00060   SI      design_size ();
00061   double  slope ();
00062   SI      spc ();
00063   SI      spc_stretch ();
00064   SI      spc_shrink ();
00065   SI      x_height ();
00066   SI      spc_quad ();
00067   SI      spc_extra ();
00068   SI      parameter (int i);
00069 
00070   void    execute (SI* s, int n, SI* buf, SI* ker, int& m);
00071   void    get_xpositions (int* s, int n, double unit, SI* xpos);
00072 };
00073 
00074 tex_font_metric load_tfm (url file_name, string family, int size);
00075 
00076 #endif // defined LOAD_TFM_H