ReactOS 0.4.15-dev-7934-g1dc8d80
ftcid.c
Go to the documentation of this file.
1/***************************************************************************/
2/* */
3/* ftcid.c */
4/* */
5/* FreeType API for accessing CID font information. */
6/* */
7/* Copyright 2007-2018 by */
8/* Derek Clegg and Michael Toftdal. */
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_CID_H
21#include FT_INTERNAL_OBJECTS_H
22#include FT_SERVICE_CID_H
23
24
25 /* documentation is in ftcid.h */
26
29 const char* *registry,
30 const char* *ordering,
32 {
34 const char* r = NULL;
35 const char* o = NULL;
36 FT_Int s = 0;
37
38
39 error = FT_ERR( Invalid_Argument );
40
41 if ( face )
42 {
43 FT_Service_CID service;
44
45
46 FT_FACE_FIND_SERVICE( face, service, CID );
47
48 if ( service && service->get_ros )
49 error = service->get_ros( face, &r, &o, &s );
50 }
51
52 if ( registry )
53 *registry = r;
54
55 if ( ordering )
56 *ordering = o;
57
58 if ( supplement )
59 *supplement = s;
60
61 return error;
62 }
63
64
67 FT_Bool *is_cid )
68 {
69 FT_Error error = FT_ERR( Invalid_Argument );
70 FT_Bool ic = 0;
71
72
73 if ( face )
74 {
75 FT_Service_CID service;
76
77
78 FT_FACE_FIND_SERVICE( face, service, CID );
79
80 if ( service && service->get_is_cid )
81 error = service->get_is_cid( face, &ic);
82 }
83
84 if ( is_cid )
85 *is_cid = ic;
86
87 return error;
88 }
89
90
93 FT_UInt glyph_index,
94 FT_UInt *cid )
95 {
96 FT_Error error = FT_ERR( Invalid_Argument );
97 FT_UInt c = 0;
98
99
100 if ( face )
101 {
102 FT_Service_CID service;
103
104
105 FT_FACE_FIND_SERVICE( face, service, CID );
106
107 if ( service && service->get_cid_from_glyph_index )
108 error = service->get_cid_from_glyph_index( face, glyph_index, &c);
109 }
110
111 if ( cid )
112 *cid = c;
113
114 return error;
115 }
116
117
118/* END */
const char const char FT_Int * supplement
Definition: cffdrivr.c:693
const char ** registry
Definition: cffdrivr.c:690
#define NULL
Definition: types.h:112
FT_Get_CID_Registry_Ordering_Supplement(FT_Face face, const char **registry, const char **ordering, FT_Int *supplement)
Definition: ftcid.c:28
FT_Get_CID_Is_Internally_CID_Keyed(FT_Face face, FT_Bool *is_cid)
Definition: ftcid.c:66
FT_Get_CID_From_Glyph_Index(FT_Face face, FT_UInt glyph_index, FT_UInt *cid)
Definition: ftcid.c:92
#define FT_EXPORT_DEF(x)
Definition: ftconfig.h:483
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:75
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
int FT_Error
Definition: fttypes.h:300
#define FT_ERR(e)
Definition: fttypes.h:586
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
static enum @954 ordering
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
const GLubyte * c
Definition: glext.h:8905
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define c
Definition: ke_i.h:80
#define error(str)
Definition: mkdosfs.c:1605
static TfClientId cid
#define const
Definition: zconf.h:233