ReactOS 0.4.15-dev-8061-g57b775e
ftbdf.c
Go to the documentation of this file.
1/***************************************************************************/
2/* */
3/* ftbdf.c */
4/* */
5/* FreeType API for accessing BDF-specific strings (body). */
6/* */
7/* Copyright 2002-2018 by */
8/* David Turner, Robert Wilhelm, and Werner Lemberg. */
9/* */
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. */
15/* */
16/***************************************************************************/
17
18
19#include <ft2build.h>
20#include FT_INTERNAL_DEBUG_H
21
22#include FT_INTERNAL_OBJECTS_H
23#include FT_SERVICE_BDF_H
24
25
26 /* documentation is in ftbdf.h */
27
30 const char* *acharset_encoding,
31 const char* *acharset_registry )
32 {
34 const char* encoding = NULL;
35 const char* registry = NULL;
36
37 FT_Service_BDF service;
38
39
40 if ( !face )
41 return FT_THROW( Invalid_Face_Handle );
42
43 FT_FACE_FIND_SERVICE( face, service, BDF );
44
45 if ( service && service->get_charset_id )
46 error = service->get_charset_id( face, &encoding, &registry );
47 else
48 error = FT_THROW( Invalid_Argument );
49
50 if ( acharset_encoding )
51 *acharset_encoding = encoding;
52
53 if ( acharset_registry )
54 *acharset_registry = registry;
55
56 return error;
57 }
58
59
60 /* documentation is in ftbdf.h */
61
64 const char* prop_name,
65 BDF_PropertyRec *aproperty )
66 {
68
69 FT_Service_BDF service;
70
71
72 if ( !face )
73 return FT_THROW( Invalid_Face_Handle );
74
75 if ( !aproperty )
76 return FT_THROW( Invalid_Argument );
77
78 aproperty->type = BDF_PROPERTY_TYPE_NONE;
79
80 FT_FACE_FIND_SERVICE( face, service, BDF );
81
82 if ( service && service->get_property )
83 error = service->get_property( face, prop_name, aproperty );
84 else
85 error = FT_THROW( Invalid_Argument );
86
87 return error;
88 }
89
90
91/* END */
const char ** registry
Definition: cffdrivr.c:690
#define NULL
Definition: types.h:112
FT_Get_BDF_Property(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
Definition: ftbdf.c:63
FT_Get_BDF_Charset_ID(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
Definition: ftbdf.c:29
@ BDF_PROPERTY_TYPE_NONE
Definition: ftbdf.h:76
#define FT_EXPORT_DEF(x)
Definition: ftconfig.h:483
#define FT_THROW(e)
Definition: ftdebug.h:213
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:75
int FT_Error
Definition: fttypes.h:300
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define error(str)
Definition: mkdosfs.c:1605
static char * encoding
Definition: xmllint.c:155
#define const
Definition: zconf.h:233