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
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 ** === N O T E S ===========================================================
23 ** ========================================================================= */
25 /* === H E A D E R S ======================================================= */
37 #include <synfig/module.h>
38 #include "lyr_freetype.h"
40 #include <ETL/stringf>
43 #include FT_FREETYPE_H
49 using namespace synfig;
51 FT_Library ft_library;
53 /* === E N T R Y P O I N T ================================================= */
55 bool freetype_constructor(synfig::ProgressCallback *cb)
58 if(cb)cb->task("Initializing FreeType...");
59 if ( (error = FT_Init_FreeType( &ft_library )) )
61 if(cb)cb->error(strprintf("lyr_freetype: FreeType initialization failed. (err=%d)",error));
67 void freetype_destructor()
69 std::cerr<<"freetype_destructor()"<<std::endl;
72 /* === E N T R Y P O I N T ================================================= */
74 MODULE_DESC_BEGIN(liblyr_freetype)
75 MODULE_NAME("FreeType Font Layer")
76 MODULE_DESCRIPTION("Provides a font rendering layer via FreeType")
77 MODULE_AUTHOR("Robert B. Quattlebaum")
79 MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
81 MODULE_CONSTRUCTOR(freetype_constructor)
82 MODULE_DESTRUCTOR(freetype_destructor)
85 MODULE_INVENTORY_BEGIN(liblyr_freetype)
88 LAYER_ALIAS(lyr_freetype,"Text")