1 /*****************************************************************************
2 * gtk2_font.h: GTK2 implementation of the Font class
3 *****************************************************************************
4 * Copyright (C) 2003 VideoLAN
5 * $Id: gtk2_font.h,v 1.6 2003/04/21 22:12:37 asmax Exp $
7 * Authors: Cyril Deguet <asmax@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
23 *****************************************************************************/
26 #ifndef VLC_SKIN_GTK2_FONT
27 #define VLC_SKIN_GTK2_FONT
29 //--- GENERAL ---------------------------------------------------------------
33 //--- GTK2 -----------------------------------------------------------------
36 //---------------------------------------------------------------------------
40 //---------------------------------------------------------------------------
41 class GTK2Font : SkinFont
44 PangoContext *Context;
46 PangoFontDescription *FontDesc;
48 // Assign font to Device Context
49 virtual void AssignFont( Graphics *dest );
52 virtual void GenericPrint( Graphics *dest, string text, int x, int y,
53 int w, int h, int align, int color );
57 GTK2Font( intf_thread_t *_p_intf, string fontname, int size, int color,
58 int weight, bool italic, bool underline );
64 virtual void GetSize( string text, int &w, int &h );
66 // Draw text with boundaries
67 virtual void Print( Graphics *dest, string text, int x, int y, int w,
70 virtual void PrintColor( Graphics *dest, string text, int x, int y,
71 int w, int h, int align, int color );
74 //---------------------------------------------------------------------------