ReactOS
0.4.16-dev-2354-g16de117
ftgasp.c
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* ftgasp.c
4
*
5
* Access of TrueType's `gasp' table (body).
6
*
7
* Copyright (C) 2007-2020 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 <
freetype/ftgasp.h
>
20
#include <
freetype/internal/tttypes.h
>
21
22
23
FT_EXPORT_DEF
(
FT_Int
)
24
FT_Get_Gasp
(
FT_Face
face
,
25
FT_UInt
ppem )
26
{
27
FT_Int
result
=
FT_GASP_NO_TABLE
;
28
29
30
if
(
face
&&
FT_IS_SFNT
(
face
) )
31
{
32
TT_Face
ttface = (
TT_Face
)
face
;
33
34
35
if
( ttface->
gasp
.
numRanges
> 0 )
36
{
37
TT_GaspRange
range
= ttface->
gasp
.
gaspRanges
;
38
TT_GaspRange
range_end =
range
+ ttface->
gasp
.
numRanges
;
39
40
41
while
( ppem >
range
->maxPPEM )
42
{
43
range
++;
44
if
(
range
>= range_end )
45
goto
Exit
;
46
}
47
48
result
=
range
->gaspFlag;
49
50
/* ensure that we don't have spurious bits */
51
if
( ttface->
gasp
.
version
== 0 )
52
result
&= 3;
53
}
54
}
55
Exit
:
56
return
result
;
57
}
58
59
60
/* END */
FT_EXPORT_DEF
#define FT_EXPORT_DEF(x)
Definition:
compiler-macros.h:255
FT_IS_SFNT
#define FT_IS_SFNT(face)
Definition:
freetype.h:1290
FT_Get_Gasp
FT_Get_Gasp(FT_Face face, FT_UInt ppem)
Definition:
ftgasp.c:24
ftgasp.h
FT_GASP_NO_TABLE
#define FT_GASP_NO_TABLE
Definition:
ftgasp.h:94
FT_UInt
unsigned int FT_UInt
Definition:
fttypes.h:231
FT_Int
signed int FT_Int
Definition:
fttypes.h:220
face
GLenum GLuint GLint GLenum face
Definition:
glext.h:7025
range
GLenum GLint * range
Definition:
glext.h:7539
result
GLuint64EXT * result
Definition:
glext.h:11304
Exit
static void Exit(void)
Definition:
sock.c:1330
FT_FaceRec_
Definition:
freetype.h:1029
TT_FaceRec_
Definition:
tttypes.h:1463
TT_FaceRec_::gasp
TT_GaspRec gasp
Definition:
tttypes.h:1526
TT_GaspRangeRec_
Definition:
tttypes.h:345
TT_Gasp_::version
FT_UShort version
Definition:
tttypes.h:377
TT_Gasp_::numRanges
FT_UShort numRanges
Definition:
tttypes.h:378
TT_Gasp_::gaspRanges
TT_GaspRange gaspRanges
Definition:
tttypes.h:379
tttypes.h
TT_Face
struct TT_FaceRec_ * TT_Face
Definition:
tttypes.h:988
sdk
lib
3rdparty
freetype
src
base
ftgasp.c
Generated on Mon Mar 9 2026 06:15:01 for ReactOS by
1.9.6