ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ftcid.c
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftcid.c                                                                */
00004 /*                                                                         */
00005 /*    FreeType API for accessing CID font information.                     */
00006 /*                                                                         */
00007 /*  Copyright 2007, 2009 by Derek Clegg, Michael Toftdal.                  */
00008 /*                                                                         */
00009 /*  This file is part of the FreeType project, and may only be used,       */
00010 /*  modified, and distributed under the terms of the FreeType project      */
00011 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00012 /*  this file you indicate that you have read the license and              */
00013 /*  understand and accept it fully.                                        */
00014 /*                                                                         */
00015 /***************************************************************************/
00016 
00017 
00018 #include <ft2build.h>
00019 #include FT_CID_H
00020 #include FT_INTERNAL_OBJECTS_H
00021 #include FT_SERVICE_CID_H
00022 
00023 
00024   /* documentation is in ftcid.h */
00025 
00026   FT_EXPORT_DEF( FT_Error )
00027   FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,
00028                                            const char*  *registry,
00029                                            const char*  *ordering,
00030                                            FT_Int       *supplement)
00031   {
00032     FT_Error     error;
00033     const char*  r = NULL;
00034     const char*  o = NULL;
00035     FT_Int       s = 0;
00036 
00037 
00038     error = FT_Err_Invalid_Argument;
00039 
00040     if ( face )
00041     {
00042       FT_Service_CID  service;
00043 
00044 
00045       FT_FACE_FIND_SERVICE( face, service, CID );
00046 
00047       if ( service && service->get_ros )
00048         error = service->get_ros( face, &r, &o, &s );
00049     }
00050 
00051     if ( registry )
00052       *registry = r;
00053 
00054     if ( ordering )
00055       *ordering = o;
00056 
00057     if ( supplement )
00058       *supplement = s;
00059 
00060     return error;
00061   }
00062 
00063 
00064   FT_EXPORT_DEF( FT_Error )
00065   FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,
00066                                       FT_Bool  *is_cid )
00067   {
00068     FT_Error  error = FT_Err_Invalid_Argument;
00069     FT_Bool   ic = 0;
00070 
00071 
00072     if ( face )
00073     {
00074       FT_Service_CID  service;
00075 
00076 
00077       FT_FACE_FIND_SERVICE( face, service, CID );
00078 
00079       if ( service && service->get_is_cid )
00080         error = service->get_is_cid( face, &ic);
00081     }
00082 
00083     if ( is_cid )
00084       *is_cid = ic;
00085 
00086     return error;
00087   }
00088 
00089 
00090   FT_EXPORT_DEF( FT_Error )
00091   FT_Get_CID_From_Glyph_Index( FT_Face   face,
00092                                FT_UInt   glyph_index,
00093                                FT_UInt  *cid )
00094   {
00095     FT_Error  error = FT_Err_Invalid_Argument;
00096     FT_UInt   c = 0;
00097 
00098 
00099     if ( face )
00100     {
00101       FT_Service_CID  service;
00102 
00103 
00104       FT_FACE_FIND_SERVICE( face, service, CID );
00105 
00106       if ( service && service->get_cid_from_glyph_index )
00107         error = service->get_cid_from_glyph_index( face, glyph_index, &c);
00108     }
00109 
00110     if ( cid )
00111       *cid = c;
00112 
00113     return error;
00114   }
00115 
00116 
00117 /* END */

Generated on Sun May 27 2012 04:33:34 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.