1 /* 2 * font.c font device selecter 3 * 4 * Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp> 5 * 1998- <masaki-c@is.aist-nara.ac.jp> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * 21 */ 22 /* $Id: font.c,v 1.1 2002/09/18 13:16:22 chikama Exp $ */ 23 24 #include "config.h" 25 26 #include "portab.h" 27 #include "nact.h" 28 #include "ags.h" 29 #include "font.h" 30 font_init(int dev)31void font_init(int dev) { 32 switch(dev) { 33 #ifdef ENAME_X11FONT 34 case FONT_X11: 35 nact->ags.font = font_x11_new(); 36 break; 37 #endif 38 #ifdef ENABLE_GTKFONT 39 case FONT_GTK: 40 nact->ags.font = font_gtk_new(); 41 break; 42 #endif 43 #ifdef ENABLE_TTF 44 case FONT_TTF: 45 nact->ags.font = font_ttf_new(); 46 break; 47 #endif 48 #ifdef ENABLE_FT2 49 case FONT_FT2: 50 nact->ags.font = font_ft2_new(); 51 break; 52 #endif 53 default: 54 #ifdef ENABLE_SDL 55 nact->ags.font = font_gtk_new(); 56 break; 57 #else 58 nact->ags.font = font_x11_new(); 59 break; 60 #endif 61 } 62 } 63