Eneboo - Documentación para desarrolladores
src/qt/src/3rdparty/opentype/otlbuffer.h
Ir a la documentación de este archivo.
00001 /* otlbuffer.h: Buffer of glyphs for substitution/positioning
00002  *
00003  * Copyrigh 2004 Red Hat Software
00004  *
00005  * Portions Copyright 1996-2000 by
00006  * David Turner, Robert Wilhelm, and Werner Lemberg.
00007  *
00008  * This file is part of the FreeType project, and may only be used
00009  * modified and distributed under the terms of the FreeType project
00010  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
00011  * this file you indicate that you have read the license and
00012  * understand and accept it fully.
00013  */
00014 #ifndef OTL_BUFFER_H
00015 #define OTL_BUFFER_H
00016 
00017 #include <ft2build.h>
00018 #include FT_FREETYPE_H
00019 
00020 FT_BEGIN_HEADER
00021 
00022 #define OTL_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
00023 
00024 #define IN_GLYPH( pos )      buffer->in_string[(pos)].gindex
00025 #define IN_ITEM( pos )       (&buffer->in_string[(pos)])
00026 #define IN_CURGLYPH()        buffer->in_string[buffer->in_pos].gindex
00027 #define IN_CURITEM()         (&buffer->in_string[buffer->in_pos])
00028 #define IN_PROPERTIES( pos ) buffer->in_string[(pos)].properties
00029 #define IN_LIGID( pos )      buffer->in_string[(pos)].ligID
00030 #define IN_COMPONENT( pos )    (buffer->in_string[(pos)].component)
00031 
00032 #define OUT_GLYPH( pos )     buffer->out_string[(pos)].gindex
00033 #define OUT_ITEM( pos )      (&buffer->out_string[(pos)])
00034 
00035 #define POSITION( pos )        (&buffer->positions[(pos)])
00036 
00037 #define ADD_String( buffer, num_in, num_out, glyph_data, component, ligID )             \
00038           ( ( error = otl_buffer_add_output_glyphs( (buffer),                           \
00039                                                     (num_in), (num_out),                \
00040                                                     (glyph_data), (component), (ligID)  \
00041                                                   ) ) != TT_Err_Ok )
00042 #define ADD_Glyph( buffer, glyph_index, component, ligID )                               \
00043           ( ( error = otl_buffer_add_output_glyph( (buffer),                             \
00044                                                     (glyph_index), (component), (ligID)  \
00045                                                   ) ) != TT_Err_Ok )
00046 
00047   typedef struct OTL_GlyphItemRec_ {
00048     FT_UInt     gindex;
00049     FT_UInt     properties;
00050     FT_UInt     cluster;
00051     FT_UShort   component;
00052     FT_UShort   ligID;
00053     FT_UShort   gproperties;
00054   } OTL_GlyphItemRec, *OTL_GlyphItem;
00055 
00056   typedef struct OTL_PositionRec_ {
00057     FT_Pos     x_pos;
00058     FT_Pos     y_pos;
00059     FT_Pos     x_advance;
00060     FT_Pos     y_advance;
00061     FT_UShort  back;            /* number of glyphs to go back
00062                                    for drawing current glyph   */
00063     FT_Bool    new_advance;     /* if set, the advance width values are
00064                                    absolute, i.e., they won't be
00065                                    added to the original glyph's value
00066                                    but rather replace them.            */
00067     FT_Short  cursive_chain;   /* character to which this connects,
00068                                    may be positive or negative; used
00069                                    only internally                     */
00070   } OTL_PositionRec, *OTL_Position;
00071 
00072 
00073   typedef struct OTL_BufferRec_{ 
00074     FT_Memory   memory;
00075     FT_ULong    allocated;
00076 
00077     FT_ULong    in_length;
00078     FT_ULong    out_length;
00079     FT_ULong    in_pos;
00080     FT_ULong    out_pos;
00081     
00082     OTL_GlyphItem  in_string;
00083     OTL_GlyphItem  out_string;
00084     OTL_Position   positions;
00085     FT_UShort      max_ligID;
00086   } OTL_BufferRec, *OTL_Buffer;
00087 
00088   FT_Error
00089   otl_buffer_new( FT_Memory   memory,
00090                   OTL_Buffer *buffer );
00091 
00092   FT_Error
00093   otl_buffer_swap( OTL_Buffer buffer );
00094 
00095   FT_Error
00096   otl_buffer_free( OTL_Buffer buffer );
00097 
00098   FT_Error
00099   otl_buffer_clear( OTL_Buffer buffer );
00100 
00101   FT_Error
00102   otl_buffer_add_glyph( OTL_Buffer buffer,
00103                         FT_UInt    glyph_index,
00104                         FT_UInt    properties,
00105                         FT_UInt    cluster );
00106 
00107   FT_Error
00108   otl_buffer_add_output_glyphs( OTL_Buffer buffer,
00109                                 FT_UShort  num_in,
00110                                 FT_UShort  num_out,
00111                                 FT_UShort *glyph_data,
00112                                 FT_UShort  component,
00113                                 FT_UShort  ligID );
00114 
00115   FT_Error
00116   otl_buffer_add_output_glyph ( OTL_Buffer buffer,
00117                                 FT_UInt    glyph_index,
00118                                 FT_UShort  component,
00119                                 FT_UShort  ligID );
00120 
00121   FT_Error
00122   otl_buffer_copy_output_glyph ( OTL_Buffer buffer );
00123 
00124   FT_UShort
00125   otl_buffer_allocate_ligid( OTL_Buffer buffer );
00126 
00127 FT_END_HEADER
00128 
00129 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'