1 /****************************************************************************
5 * FreeType utility file to access FSType data (body).
7 * Copyright (C) 2008-2023 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
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.
18 #include <freetype/t1tables.h>
19 #include <freetype/tttables.h>
20 #include <freetype/internal/ftserv.h>
21 #include <freetype/internal/services/svpsinfo.h>
24 /* documentation is in freetype.h */
26 FT_EXPORT_DEF( FT_UShort )
27 FT_Get_FSType_Flags( FT_Face face )
32 /* first, try to get the fs_type directly from the font */
35 FT_Service_PsInfo service = NULL;
38 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
40 if ( service && service->ps_get_font_extra )
42 PS_FontExtraRec extra;
45 if ( !service->ps_get_font_extra( face, &extra ) &&
51 /* look at FSType before fsType for Type42 */
53 if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL &&
54 os2->version != 0xFFFFU )