Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftgasp.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /***************************************************************************/
2 /* */
3 /* ftgasp.c */
4 /* */
5 /* Access of TrueType's `gasp' table (body). */
6 /* */
7 /* Copyright 2007 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 "../../include/ft2build.h"
20 #include "../../include/freetype/ftgasp.h"
21 #include "../../include/freetype/internal/tttypes.h"
22
23
24 FT_EXPORT_DEF( FT_Int )
25 FT_Get_Gasp( FT_Face face,
26 FT_UInt ppem )
27 {
28 FT_Int result = FT_GASP_NO_TABLE;
29
30
31 if ( face && FT_IS_SFNT( face ) )
32 {
33 TT_Face ttface = (TT_Face)face;
34
35
36 if ( ttface->gasp.numRanges > 0 )
37 {
38 TT_GaspRange range = ttface->gasp.gaspRanges;
39 TT_GaspRange range_end = range + ttface->gasp.numRanges;
40
41
42 while ( ppem > range->maxPPEM )
43 {
44 range++;
45 if ( range >= range_end )
46 goto Exit;
47 }
48
49 result = range->gaspFlag;
50
51 /* ensure that we don't have spurious bits */
52 if ( ttface->gasp.version == 0 )
53 result &= 3;
54 }
55 }
56 Exit:
57 return result;
58 }
59
60
61 /* END */
OLDNEW
« no previous file with comments | « core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftfstype.c ('k') | core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftgloadr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698