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