~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/freetype/src/base/ftbdf.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************/
 
2
/*                                                                         */
 
3
/*  ftbdf.c                                                                */
 
4
/*                                                                         */
 
5
/*    FreeType API for accessing BDF-specific strings (body).              */
 
6
/*                                                                         */
 
7
/*  Copyright 2002, 2003 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 <ft2build.h>
 
20
#include FT_INTERNAL_OBJECTS_H
 
21
#include FT_SERVICE_BDF_H
 
22
 
 
23
 
 
24
  FT_EXPORT_DEF( FT_Error )
 
25
  FT_Get_BDF_Charset_ID( FT_Face       face,
 
26
                         const char*  *acharset_encoding,
 
27
                         const char*  *acharset_registry )
 
28
  {
 
29
    FT_Error     error;
 
30
    const char*  encoding = NULL;
 
31
    const char*  registry = NULL;
 
32
 
 
33
 
 
34
    error = FT_Err_Invalid_Argument;
 
35
 
 
36
    if ( face )
 
37
    {
 
38
      FT_Service_BDF  service;
 
39
 
 
40
 
 
41
      FT_FACE_FIND_SERVICE( face, service, BDF );
 
42
 
 
43
      if ( service && service->get_charset_id )
 
44
        error = service->get_charset_id( face, &encoding, &registry );
 
45
    }
 
46
 
 
47
    if ( acharset_encoding )
 
48
      *acharset_encoding = encoding;
 
49
 
 
50
    if ( acharset_registry )
 
51
      *acharset_registry = registry;
 
52
 
 
53
    return error;
 
54
  }
 
55
 
 
56
 
 
57
  FT_EXPORT( FT_Error )
 
58
  FT_Get_BDF_Property( FT_Face           face,
 
59
                       const char*       prop_name,
 
60
                       BDF_PropertyRec  *aproperty )
 
61
  {
 
62
    FT_Error  error;
 
63
 
 
64
 
 
65
    error = FT_Err_Invalid_Argument;
 
66
 
 
67
    aproperty->type = BDF_PROPERTY_TYPE_NONE;
 
68
 
 
69
    if ( face )
 
70
    {
 
71
      FT_Service_BDF  service;
 
72
 
 
73
 
 
74
      FT_FACE_FIND_SERVICE( face, service, BDF );
 
75
 
 
76
      if ( service && service->get_property )
 
77
        error = service->get_property( face, prop_name, aproperty );
 
78
    }
 
79
 
 
80
    return  error;
 
81
  }
 
82
 
 
83
 
 
84
/* END */