Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenftfstype.c
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* ftfstype.c */ 00004 /* */ 00005 /* FreeType utility file to access FSType data (body). */ 00006 /* */ 00007 /* Copyright 2008, 2009 by */ 00008 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 00009 /* */ 00010 /* This file is part of the FreeType project, and may only be used, */ 00011 /* modified, and distributed under the terms of the FreeType project */ 00012 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00013 /* this file you indicate that you have read the license and */ 00014 /* understand and accept it fully. */ 00015 /* */ 00016 /***************************************************************************/ 00017 00018 #include <ft2build.h> 00019 #include FT_TYPE1_TABLES_H 00020 #include FT_TRUETYPE_TABLES_H 00021 #include FT_INTERNAL_SERVICE_H 00022 #include FT_SERVICE_POSTSCRIPT_INFO_H 00023 00024 00025 /* documentation is in freetype.h */ 00026 00027 FT_EXPORT_DEF( FT_UShort ) 00028 FT_Get_FSType_Flags( FT_Face face ) 00029 { 00030 TT_OS2* os2; 00031 00032 00033 /* first, try to get the fs_type directly from the font */ 00034 if ( face ) 00035 { 00036 FT_Service_PsInfo service = NULL; 00037 00038 00039 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 00040 00041 if ( service && service->ps_get_font_extra ) 00042 { 00043 PS_FontExtraRec extra; 00044 00045 00046 if ( !service->ps_get_font_extra( face, &extra ) && 00047 extra.fs_type != 0 ) 00048 return extra.fs_type; 00049 } 00050 } 00051 00052 /* look at FSType before fsType for Type42 */ 00053 00054 if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, ft_sfnt_os2 ) ) != NULL && 00055 os2->version != 0xFFFFU ) 00056 return os2->fsType; 00057 00058 return 0; 00059 } 00060 00061 00062 /* END */ Generated on Sun May 27 2012 04:33:34 for ReactOS by
1.7.6.1
|