/* * Copyright 2000 Computing Research Labs, New Mexico State University * Copyright 2001-2004, 2011 Francesco Zappa Nardelli * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef BDF_H_ #define BDF_H_ /* * Based on bdf.h,v 1.16 2000/03/16 20:08:51 mleisher */ #include <freetype/internal/ftobjs.h> #include <freetype/internal/ftstream.h> #include <freetype/internal/fthash.h> FT_BEGIN_HEADER /* Imported from bdfP.h */ #define _bdf_glyph_modified( map, e ) … #define _bdf_set_glyph_modified( map, e ) … #define _bdf_clear_glyph_modified( map, e ) … /* end of bdfP.h */ /************************************************************************** * * BDF font options macros and types. * */ #define BDF_CORRECT_METRICS … #define BDF_KEEP_COMMENTS … #define BDF_KEEP_UNENCODED … #define BDF_PROPORTIONAL … #define BDF_MONOWIDTH … #define BDF_CHARCELL … #define BDF_ALL_SPACING … #define BDF_DEFAULT_LOAD_OPTIONS … bdf_options_t; /* Callback function type for unknown configuration options. */ bdf_options_callback_t; /************************************************************************** * * BDF font property macros and types. * */ #define BDF_ATOM … #define BDF_INTEGER … #define BDF_CARDINAL … /* This structure represents a particular property of a font. */ /* There are a set of defaults and each font has their own. */ bdf_property_t; /************************************************************************** * * BDF font metric and glyph types. * */ bdf_bbx_t; bdf_glyph_t; bdf_font_t; /************************************************************************** * * Types for load/save callbacks. * */ /* Error codes. */ #define BDF_MISSING_START … #define BDF_MISSING_FONTNAME … #define BDF_MISSING_SIZE … #define BDF_MISSING_CHARS … #define BDF_MISSING_STARTCHAR … #define BDF_MISSING_ENCODING … #define BDF_MISSING_BBX … #define BDF_OUT_OF_MEMORY … #define BDF_INVALID_LINE … /************************************************************************** * * BDF font API. * */ FT_LOCAL( FT_Error ) bdf_load_font( FT_Stream stream, FT_Memory memory, bdf_options_t* opts, bdf_font_t* *font ); FT_LOCAL( void ) bdf_free_font( bdf_font_t* font ); FT_LOCAL( bdf_property_t * ) bdf_get_font_property( bdf_font_t* font, const char* name ); FT_END_HEADER #endif /* BDF_H_ */ /* END */