misc/libfreetype/src/pcf/pcf.h
author sheepluva
Wed, 02 May 2012 12:24:44 +0200
changeset 6991 1ec44dde5eb9
parent 5172 88f2e05288ba
permissions -rw-r--r--
make search filter field have a useable size on low frontend resolution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/*  pcf.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
  FreeType font driver for pcf fonts
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
  Copyright (C) 2000, 2001, 2002, 2003, 2006, 2010 by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
  Francesco Zappa Nardelli
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
Permission is hereby granted, free of charge, to any person obtaining a copy
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
of this software and associated documentation files (the "Software"), to deal
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
in the Software without restriction, including without limitation the rights
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
copies of the Software, and to permit persons to whom the Software is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
furnished to do so, subject to the following conditions:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
The above copyright notice and this permission notice shall be included in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
all copies or substantial portions of the Software.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
THE SOFTWARE.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
*/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#ifndef __PCF_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define __PCF_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#include FT_INTERNAL_DRIVER_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
#include FT_INTERNAL_STREAM_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
  typedef struct  PCF_TableRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
    FT_ULong  type;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
    FT_ULong  format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
    FT_ULong  size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
    FT_ULong  offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  } PCF_TableRec, *PCF_Table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  typedef struct  PCF_TocRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
    FT_ULong   version;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
    FT_ULong   count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
    PCF_Table  tables;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  } PCF_TocRec, *PCF_Toc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  typedef struct  PCF_ParsePropertyRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
    FT_Long  name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
    FT_Byte  isString;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
    FT_Long  value;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  } PCF_ParsePropertyRec, *PCF_ParseProperty;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  typedef struct  PCF_PropertyRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
    FT_String*  name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
    FT_Byte     isString;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
    union
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
      FT_String*  atom;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
      FT_Long     l;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
      FT_ULong    ul;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    } value;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  } PCF_PropertyRec, *PCF_Property;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  typedef struct  PCF_Compressed_MetricRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
    FT_Byte  leftSideBearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
    FT_Byte  rightSideBearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
    FT_Byte  characterWidth;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
    FT_Byte  ascent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
    FT_Byte  descent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  } PCF_Compressed_MetricRec, *PCF_Compressed_Metric;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  typedef struct  PCF_MetricRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
    FT_Short  leftSideBearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
    FT_Short  rightSideBearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
    FT_Short  characterWidth;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
    FT_Short  ascent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
    FT_Short  descent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
    FT_Short  attributes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
    FT_ULong  bits;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  } PCF_MetricRec, *PCF_Metric;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  typedef struct  PCF_AccelRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
    FT_Byte        noOverlap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
    FT_Byte        constantMetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
    FT_Byte        terminalFont;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
    FT_Byte        constantWidth;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
    FT_Byte        inkInside;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
    FT_Byte        inkMetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
    FT_Byte        drawDirection;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
    FT_Long        fontAscent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
    FT_Long        fontDescent;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
    FT_Long        maxOverlap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    PCF_MetricRec  minbounds;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
    PCF_MetricRec  maxbounds;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
    PCF_MetricRec  ink_minbounds;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
    PCF_MetricRec  ink_maxbounds;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  } PCF_AccelRec, *PCF_Accel;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  typedef struct  PCF_EncodingRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
    FT_Long    enc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
    FT_UShort  glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  } PCF_EncodingRec, *PCF_Encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  typedef struct  PCF_FaceRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
    FT_FaceRec     root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
    FT_StreamRec   comp_stream;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
    FT_Stream      comp_source;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
    char*          charset_encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
    char*          charset_registry;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    PCF_TocRec     toc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
    PCF_AccelRec   accel;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    int            nprops;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
    PCF_Property   properties;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    FT_Long        nmetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
    PCF_Metric     metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
    FT_Long        nencodings;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    PCF_Encoding   encodings;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
    FT_Short       defaultChar;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
    FT_ULong       bitmapsFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
    FT_CharMap     charmap_handle;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
    FT_CharMapRec  charmap;  /* a single charmap per face */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
  } PCF_FaceRec, *PCF_Face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
  /* macros for pcf font format */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
#define LSBFirst  0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
#define MSBFirst  1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
#define PCF_FILE_VERSION        ( ( 'p' << 24 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
                                  ( 'c' << 16 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
                                  ( 'f' <<  8 ) | 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
#define PCF_FORMAT_MASK         0xFFFFFF00UL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
#define PCF_DEFAULT_FORMAT      0x00000000UL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
#define PCF_INKBOUNDS           0x00000200UL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
#define PCF_ACCEL_W_INKBOUNDS   0x00000100UL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
#define PCF_COMPRESSED_METRICS  0x00000100UL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
#define PCF_FORMAT_MATCH( a, b ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
          ( ( (a) & PCF_FORMAT_MASK ) == ( (b) & PCF_FORMAT_MASK ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
#define PCF_GLYPH_PAD_MASK  ( 3 << 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
#define PCF_BYTE_MASK       ( 1 << 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
#define PCF_BIT_MASK        ( 1 << 3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
#define PCF_SCAN_UNIT_MASK  ( 3 << 4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
#define PCF_BYTE_ORDER( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
          ( ( (f) & PCF_BYTE_MASK ) ? MSBFirst : LSBFirst )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
#define PCF_BIT_ORDER( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
          ( ( (f) & PCF_BIT_MASK ) ? MSBFirst : LSBFirst )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
#define PCF_GLYPH_PAD_INDEX( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
          ( (f) & PCF_GLYPH_PAD_MASK )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
#define PCF_GLYPH_PAD( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
          ( 1 << PCF_GLYPH_PAD_INDEX( f ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
#define PCF_SCAN_UNIT_INDEX( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
          ( ( (f) & PCF_SCAN_UNIT_MASK ) >> 4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
#define PCF_SCAN_UNIT( f ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
          ( 1 << PCF_SCAN_UNIT_INDEX( f ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
#define PCF_FORMAT_BITS( f )             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
          ( (f) & ( PCF_GLYPH_PAD_MASK | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
                    PCF_BYTE_MASK      | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
                    PCF_BIT_MASK       | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
                    PCF_SCAN_UNIT_MASK ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
#define PCF_SIZE_TO_INDEX( s )  ( (s) == 4 ? 2 : (s) == 2 ? 1 : 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
#define PCF_INDEX_TO_SIZE( b )  ( 1 << b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
#define PCF_FORMAT( bit, byte, glyph, scan )          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
          ( ( PCF_SIZE_TO_INDEX( scan )      << 4 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
            ( ( (bit)  == MSBFirst ? 1 : 0 ) << 3 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
            ( ( (byte) == MSBFirst ? 1 : 0 ) << 2 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
            ( PCF_SIZE_TO_INDEX( glyph )     << 0 ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
#define PCF_PROPERTIES        ( 1 << 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
#define PCF_ACCELERATORS      ( 1 << 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
#define PCF_METRICS           ( 1 << 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
#define PCF_BITMAPS           ( 1 << 3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
#define PCF_INK_METRICS       ( 1 << 4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
#define PCF_BDF_ENCODINGS     ( 1 << 5 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
#define PCF_SWIDTHS           ( 1 << 6 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
#define PCF_GLYPH_NAMES       ( 1 << 7 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
#define PCF_BDF_ACCELERATORS  ( 1 << 8 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
#define GLYPHPADOPTIONS  4 /* I'm not sure about this */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  pcf_load_font( FT_Stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
                 PCF_Face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
#endif /* __PCF_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
/* END */