Back to index

texmacs  1.0.7.15
tt_face.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : tt_face.hpp
00004 * DESCRIPTION: resources for true type faces, gliefs and metrics
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 TT_FACE_H
00013 #define TT_FACE_H
00014 #include "bitmap_font.hpp"
00015 #include "Freetype/free_type.hpp"
00016 #include "hashmap.hpp"
00017 
00018 #ifdef USE_FREETYPE
00019 
00020 RESOURCE(tt_face);
00021 
00022 struct tt_face_rep: rep<tt_face> {
00023   bool bad_face;
00024   FT_Face ft_face;
00025   tt_face_rep (string name);
00026 };
00027 
00028 struct tt_font_metric_rep: font_metric_rep {
00029   bool bad_metric;
00030   tt_face face;
00031   int size, dpi;
00032   hashmap<int,pointer> fnm;
00033   //metric* fnm;
00034   //bool* done;
00035   tt_font_metric_rep (string name, string family, int size, int dpi);
00036   metric& get (int char_code);
00037 };
00038 
00039 struct tt_font_glyphs_rep: font_glyphs_rep {
00040   bool bad_glyphs;
00041   tt_face face;
00042   int size, dpi;
00043   hashmap<int,glyph> fng;
00044   //glyph* fng;
00045   //bool* done;
00046   tt_font_glyphs_rep (string name, string family, int size, int dpi);
00047   glyph& get (int char_code);
00048 };
00049 
00050 tt_face load_tt_face (string name);
00051 font_metric tt_font_metric (string family, int size, int dpi);
00052 //font_glyphs tt_font_glyphs (string family, int size, int dpi);
00053 
00054 #endif // USE_FREETYPE
00055 
00056 #endif // defined TT_FACE_H