(root)/
freetype-2.13.2/
src/
base/
ftfntfmt.c
       1  /****************************************************************************
       2   *
       3   * ftfntfmt.c
       4   *
       5   *   FreeType utility file for font formats (body).
       6   *
       7   * Copyright (C) 2002-2023 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 <freetype/ftfntfmt.h>
      20  #include <freetype/internal/ftobjs.h>
      21  #include <freetype/internal/services/svfntfmt.h>
      22  
      23  
      24    /* documentation is in ftfntfmt.h */
      25  
      26    FT_EXPORT_DEF( const char* )
      27    FT_Get_Font_Format( FT_Face  face )
      28    {
      29      const char*  result = NULL;
      30  
      31  
      32      if ( face )
      33        FT_FACE_FIND_SERVICE( face, result, FONT_FORMAT );
      34  
      35      return result;
      36    }
      37  
      38  
      39    /* deprecated function name; retained for ABI compatibility */
      40  
      41    FT_EXPORT_DEF( const char* )
      42    FT_Get_X11_Font_Format( FT_Face  face )
      43    {
      44      const char*  result = NULL;
      45  
      46  
      47      if ( face )
      48        FT_FACE_FIND_SERVICE( face, result, FONT_FORMAT );
      49  
      50      return result;
      51    }
      52  
      53  
      54  /* END */