ftbdf.c

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftbdf.c                                                                */
00004 /*                                                                         */
00005 /*    FreeType API for accessing BDF-specific strings (body).              */
00006 /*                                                                         */
00007 /*  Copyright 2002, 2003, 2004 by                                          */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #include <ft2build.h>
00020 #include FT_INTERNAL_OBJECTS_H
00021 #include FT_SERVICE_BDF_H
00022 
00023 
00024   /* documentation is in ftbdf.h */
00025 
00026   FT_EXPORT_DEF( FT_Error )
00027   FT_Get_BDF_Charset_ID( FT_Face       face,
00028                          const char*  *acharset_encoding,
00029                          const char*  *acharset_registry )
00030   {
00031     FT_Error     error;
00032     const char*  encoding = NULL;
00033     const char*  registry = NULL;
00034 
00035 
00036     error = FT_Err_Invalid_Argument;
00037 
00038     if ( face )
00039     {
00040       FT_Service_BDF  service;
00041 
00042 
00043       FT_FACE_FIND_SERVICE( face, service, BDF );
00044 
00045       if ( service && service->get_charset_id )
00046         error = service->get_charset_id( face, &encoding, &registry );
00047     }
00048 
00049     if ( acharset_encoding )
00050       *acharset_encoding = encoding;
00051 
00052     if ( acharset_registry )
00053       *acharset_registry = registry;
00054 
00055     return error;
00056   }
00057 
00058 
00059   /* documentation is in ftbdf.h */
00060 
00061   FT_EXPORT_DEF( FT_Error )
00062   FT_Get_BDF_Property( FT_Face           face,
00063                        const char*       prop_name,
00064                        BDF_PropertyRec  *aproperty )
00065   {
00066     FT_Error  error;
00067 
00068 
00069     error = FT_Err_Invalid_Argument;
00070 
00071     aproperty->type = BDF_PROPERTY_TYPE_NONE;
00072 
00073     if ( face )
00074     {
00075       FT_Service_BDF  service;
00076 
00077 
00078       FT_FACE_FIND_SERVICE( face, service, BDF );
00079 
00080       if ( service && service->get_property )
00081         error = service->get_property( face, prop_name, aproperty );
00082     }
00083 
00084     return  error;
00085   }
00086 
00087 
00088 /* END */

Generated on Tue Jul 5 14:13:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1