1 /***************************************************************************/
5 /* FreeType API for accessing BDF-specific strings (body). */
7 /* Copyright 2002-2004, 2013, 2014 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
20 #include FT_INTERNAL_DEBUG_H
22 #include FT_INTERNAL_OBJECTS_H
23 #include FT_SERVICE_BDF_H
26 /* documentation is in ftbdf.h */
28 FT_EXPORT_DEF( FT_Error )
29 FT_Get_BDF_Charset_ID( FT_Face face,
30 const char* *acharset_encoding,
31 const char* *acharset_registry )
34 const char* encoding = NULL;
35 const char* registry = NULL;
37 FT_Service_BDF service;
41 return FT_THROW( Invalid_Face_Handle );
43 FT_FACE_FIND_SERVICE( face, service, BDF );
45 if ( service && service->get_charset_id )
46 error = service->get_charset_id( face, &encoding, ®istry );
48 error = FT_THROW( Invalid_Argument );
50 if ( acharset_encoding )
51 *acharset_encoding = encoding;
53 if ( acharset_registry )
54 *acharset_registry = registry;
60 /* documentation is in ftbdf.h */
62 FT_EXPORT_DEF( FT_Error )
63 FT_Get_BDF_Property( FT_Face face,
64 const char* prop_name,
65 BDF_PropertyRec *aproperty )
69 FT_Service_BDF service;
73 return FT_THROW( Invalid_Face_Handle );
76 return FT_THROW( Invalid_Argument );
78 aproperty->type = BDF_PROPERTY_TYPE_NONE;
80 FT_FACE_FIND_SERVICE( face, service, BDF );
82 if ( service && service->get_property )
83 error = service->get_property( face, prop_name, aproperty );
85 error = FT_THROW( Invalid_Argument );