1 /* === S Y N F I G ========================================================= */
2 /*! \file lyr_freetype/main.cpp
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 ** Copyright (c) 2007 Chris Moore
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 ** === N O T E S ===========================================================
24 ** ========================================================================= */
26 /* === H E A D E R S ======================================================= */
38 #include <synfig/module.h>
39 #include "lyr_freetype.h"
41 #include <ETL/stringf>
44 #include FT_FREETYPE_H
50 using namespace synfig;
52 FT_Library ft_library;
54 /* === E N T R Y P O I N T ================================================= */
56 bool freetype_constructor(synfig::ProgressCallback *cb)
59 if(cb)cb->task("Initializing FreeType...");
60 if ( (error = FT_Init_FreeType( &ft_library )) )
62 if(cb)cb->error(strprintf("Layer_Freetype: FreeType initialization failed. (err=%d)",error));
68 void freetype_destructor()
70 std::cerr<<"freetype_destructor()"<<std::endl;
73 /* === E N T R Y P O I N T ================================================= */
75 MODULE_DESC_BEGIN(liblyr_freetype)
76 MODULE_NAME("FreeType Font Layer")
77 MODULE_DESCRIPTION("Provides a font rendering layer via FreeType")
78 MODULE_AUTHOR("Robert B. Quattlebaum")
80 MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
82 MODULE_CONSTRUCTOR(freetype_constructor)
83 MODULE_DESTRUCTOR(freetype_destructor)
86 MODULE_INVENTORY_BEGIN(liblyr_freetype)
89 LAYER_ALIAS(Layer_Freetype,"Text")