Back to index

texmacs  1.0.7.15
x_font.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : x_font.hpp
00004 * DESCRIPTION: X11 fonts
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 X_FONT_H
00013 #define X_FONT_H
00014 #include "font.hpp"
00015 
00016 /******************************************************************************
00017 * X bitmaps
00018 ******************************************************************************/
00019 
00020 struct Bitmap_rep {
00021   Pixmap bm;
00022   int width, height;
00023   SI xoff, yoff;
00024 };
00025 typedef Bitmap_rep* Bitmap;
00026 
00027 /******************************************************************************
00028 * The x_font representation class
00029 ******************************************************************************/
00030 
00031 struct x_font_rep: font_rep {
00032   string      family;
00033   int         dpi;
00034   font_metric fnm;
00035   font_glyphs fng;
00036 
00037   x_font_rep (string name, string family, int size, int dpi);
00038   void get_extents (string s, metric& ex);
00039   void get_xpositions (string s, SI* xpos);
00040   void draw (renderer ren, string s, SI x, SI y);
00041   glyph get_glyph (string s);
00042 };
00043 
00044 #endif // defined X_FONT_H