• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftwinfnt.c                                                             */
4 /*                                                                         */
5 /*    FreeType API for accessing Windows FNT specific info (body).         */
6 /*                                                                         */
7 /*  Copyright 2003-2015 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 #include FT_WINFONTS_H
22 #include FT_INTERNAL_OBJECTS_H
23 #include FT_SERVICE_WINFNT_H
24 
25 
26   /* documentation is in ftwinfnt.h */
27 
28   FT_EXPORT_DEF( FT_Error )
FT_Get_WinFNT_Header(FT_Face face,FT_WinFNT_HeaderRec * header)29   FT_Get_WinFNT_Header( FT_Face               face,
30                         FT_WinFNT_HeaderRec  *header )
31   {
32     FT_Service_WinFnt  service;
33     FT_Error           error;
34 
35 
36     if ( !face )
37       return FT_THROW( Invalid_Face_Handle );
38 
39     if ( !header )
40       return FT_THROW( Invalid_Argument );
41 
42     FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );
43 
44     if ( service )
45       error = service->get_header( face, header );
46     else
47       error = FT_THROW( Invalid_Argument );
48 
49     return error;
50   }
51 
52 
53 /* END */
54