David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 1 | /***************************************************************************/ |
| 2 | /* */ |
| 3 | /* ftwinfnt.c */ |
| 4 | /* */ |
| 5 | /* FreeType API for accessing Windows FNT specific info (body). */ |
| 6 | /* */ |
Werner Lemberg | ece8b20 | 2004-12-13 23:16:59 +0000 | [diff] [blame] | 7 | /* Copyright 2003, 2004 by */ |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 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_WINFONTS_H |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 21 | #include FT_INTERNAL_OBJECTS_H |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 22 | #include FT_SERVICE_WINFNT_H |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 23 | |
| 24 | |
Werner Lemberg | ece8b20 | 2004-12-13 23:16:59 +0000 | [diff] [blame] | 25 | /* documentation is in ftwinfnt.h */ |
| 26 | |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 27 | FT_EXPORT_DEF( FT_Error ) |
Werner Lemberg | c8c6bf5 | 2003-04-23 05:38:13 +0000 | [diff] [blame] | 28 | FT_Get_WinFNT_Header( FT_Face face, |
| 29 | FT_WinFNT_HeaderRec *header ) |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 30 | { |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 31 | FT_Service_WinFnt service; |
| 32 | FT_Error error; |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 33 | |
Werner Lemberg | a259b6d | 2003-09-22 09:53:56 +0000 | [diff] [blame] | 34 | |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 35 | error = FT_Err_Invalid_Argument; |
| 36 | |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 37 | if ( face != NULL ) |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 38 | { |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 39 | FT_FACE_LOOKUP_SERVICE( face, service, WINFNT ); |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 40 | |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 41 | if ( service != NULL ) |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 42 | { |
David Turner | e2d1284 | 2003-09-21 17:15:55 +0000 | [diff] [blame] | 43 | error = service->get_header( face, header ); |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 44 | } |
| 45 | } |
Werner Lemberg | a259b6d | 2003-09-22 09:53:56 +0000 | [diff] [blame] | 46 | |
| 47 | return error; |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 48 | } |
| 49 | |
Werner Lemberg | a259b6d | 2003-09-22 09:53:56 +0000 | [diff] [blame] | 50 | |
David Turner | 52e0a7e | 2003-01-17 08:40:32 +0000 | [diff] [blame] | 51 | /* END */ |