PRIVATEHEADERS = \
ftglue.h \
harfbuzz-impl.h \
+ harfbuzz-buffer-private.h \
harfbuzz-gdef-private.h \
harfbuzz-gpos-private.h \
harfbuzz-gsub-private.h \
#define QALLOC(ptr,size) ( (ptr) = _hb_ftglue_qalloc( (size), &error ), error != 0 )
-FT_Pointer
+HB_INTERNAL FT_Pointer
_hb_ftglue_alloc( FT_ULong size,
HB_Error *perror )
{
}
-FT_Pointer
+HB_INTERNAL FT_Pointer
_hb_ftglue_realloc( FT_Pointer block,
FT_ULong new_size,
HB_Error *perror )
}
-void
+HB_INTERNAL void
_hb_ftglue_free( FT_Pointer block )
{
if ( block )
}
-FT_Long
+HB_INTERNAL FT_Long
_hb_ftglue_stream_pos( FT_Stream stream )
{
LOG(( "ftglue:stream:pos() -> %ld\n", stream->pos ));
}
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_stream_seek( FT_Stream stream,
FT_Long pos )
{
}
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_stream_frame_enter( FT_Stream stream,
FT_ULong count )
{
}
-void
+HB_INTERNAL void
_hb_ftglue_stream_frame_exit( FT_Stream stream )
{
if ( stream->read )
}
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_face_goto_table( FT_Face face,
FT_ULong the_tag,
FT_Stream stream )
/* abuse these private header/source files */
/* helper func to set a breakpoint on */
-HB_Error
+HB_INTERNAL HB_Error
_hb_err (HB_Error code)
{
return code;
#include <ft2build.h>
#include FT_FREETYPE_H
+#include "harfbuzz-impl.h"
#include "harfbuzz-open.h"
FT_BEGIN_HEADER
#define GET_ULong() ((FT_ULong)GET_Long())
#define GET_Tag4() GET_ULong()
-FT_Long
+HB_INTERNAL FT_Long
_hb_ftglue_stream_pos( FT_Stream stream );
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_stream_seek( FT_Stream stream,
FT_Long pos );
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_stream_frame_enter( FT_Stream stream,
FT_ULong size );
-void
+HB_INTERNAL void
_hb_ftglue_stream_frame_exit( FT_Stream stream );
-HB_Error
+HB_INTERNAL HB_Error
_hb_ftglue_face_goto_table( FT_Face face,
FT_ULong tag,
FT_Stream stream );
#define MEM_Copy(dest,source,count) memcpy( (char*)(dest), (const char*)(source), (size_t)(count) )
-FT_Pointer
+HB_INTERNAL FT_Pointer
_hb_ftglue_alloc( FT_ULong size,
HB_Error *perror_ );
-FT_Pointer
+HB_INTERNAL FT_Pointer
_hb_ftglue_realloc( FT_Pointer block,
FT_ULong new_size,
HB_Error *perror_ );
-void
+HB_INTERNAL void
_hb_ftglue_free( FT_Pointer block );
/* abuse these private header/source files */
/* helper func to set a breakpoint on */
-HB_Error _hb_err (HB_Error code);
+HB_INTERNAL HB_Error
+_hb_err (HB_Error code);
FT_END_HEADER
--- /dev/null
+/* harfbuzz-buffer-private.h: Buffer of glyphs for substitution/positioning
+ *
+ * Copyright 2004,7 Red Hat Software
+ *
+ * Portions Copyright 1996-2000 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used
+ * modified and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ */
+#ifndef HARFBUZZ_BUFFER_PRIVATE_H
+#define HARFBUZZ_BUFFER_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-buffer.h"
+
+FT_BEGIN_HEADER
+
+#define HB_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
+
+HB_INTERNAL void
+_hb_buffer_swap( HB_Buffer buffer );
+
+HB_INTERNAL void
+_hb_buffer_clear_output( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_clear_positions( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyphs( HB_Buffer buffer,
+ FT_UShort num_in,
+ FT_UShort num_out,
+ FT_UShort *glyph_data,
+ FT_UShort component,
+ FT_UShort ligID );
+
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyph ( HB_Buffer buffer,
+ FT_UInt glyph_index,
+ FT_UShort component,
+ FT_UShort ligID );
+
+HB_INTERNAL HB_Error
+_hb_buffer_copy_output_glyph ( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_replace_output_glyph ( HB_Buffer buffer,
+ FT_UInt glyph_index,
+ FT_Bool inplace );
+
+HB_INTERNAL FT_UShort
+_hb_buffer_allocate_ligid( HB_Buffer buffer );
+
+FT_END_HEADER
+
+#endif /* HARFBUZZ_BUFFER_PRIVATE_H */
*/
#include "harfbuzz-impl.h"
-#include "harfbuzz-buffer.h"
+#include "harfbuzz-buffer-private.h"
#include "harfbuzz-gsub-private.h"
#include "harfbuzz-gpos-private.h"
* to in_string (FALSE) or alt_string (TRUE).
*/
+/* Internal API */
+
static HB_Error
hb_buffer_ensure( HB_Buffer buffer,
FT_ULong size )
return HB_Err_Ok;
}
+/* Public API */
+
HB_Error
hb_buffer_new( HB_Buffer *pbuffer )
{
buffer->max_ligID = 0;
}
-void
-hb_buffer_clear_output( HB_Buffer buffer )
+HB_Error
+hb_buffer_add_glyph( HB_Buffer buffer,
+ FT_UInt glyph_index,
+ FT_UInt properties,
+ FT_UInt cluster )
+{
+ HB_Error error;
+ HB_GlyphItem glyph;
+
+ error = hb_buffer_ensure( buffer, buffer->in_length + 1 );
+ if ( error )
+ return error;
+
+ glyph = &buffer->in_string[buffer->in_length];
+ glyph->gindex = glyph_index;
+ glyph->properties = properties;
+ glyph->cluster = cluster;
+ glyph->component = 0;
+ glyph->ligID = 0;
+ glyph->gproperties = HB_GLYPH_PROPERTIES_UNKNOWN;
+
+ buffer->in_length++;
+
+ return HB_Err_Ok;
+}
+
+/* HarfBuzz-Internal API */
+
+HB_INTERNAL void
+_hb_buffer_clear_output( HB_Buffer buffer )
{
buffer->out_length = 0;
buffer->out_pos = 0;
buffer->separate_out = FALSE;
}
-HB_Error
-hb_buffer_clear_positions( HB_Buffer buffer )
+HB_INTERNAL HB_Error
+_hb_buffer_clear_positions( HB_Buffer buffer )
{
if ( !buffer->positions )
{
return HB_Err_Ok;
}
-void
-hb_buffer_swap( HB_Buffer buffer )
+HB_INTERNAL void
+_hb_buffer_swap( HB_Buffer buffer )
{
HB_GlyphItem tmp_string;
int tmp_length;
buffer->out_pos = tmp_pos;
}
-HB_Error
-hb_buffer_add_glyph( HB_Buffer buffer,
- FT_UInt glyph_index,
- FT_UInt properties,
- FT_UInt cluster )
-{
- HB_Error error;
- HB_GlyphItem glyph;
-
- error = hb_buffer_ensure( buffer, buffer->in_length + 1 );
- if ( error )
- return error;
-
- glyph = &buffer->in_string[buffer->in_length];
- glyph->gindex = glyph_index;
- glyph->properties = properties;
- glyph->cluster = cluster;
- glyph->component = 0;
- glyph->ligID = 0;
- glyph->gproperties = HB_GLYPH_PROPERTIES_UNKNOWN;
-
- buffer->in_length++;
-
- return HB_Err_Ok;
-}
-
/* The following function copies `num_out' elements from `glyph_data'
to `buffer->out_string', advancing the in array pointer in the structure
by `num_in' elements, and the out array pointer by `num_out' elements.
The cluster value for the glyph at position buffer->in_pos is used
for all replacement glyphs */
-HB_Error
-hb_buffer_add_output_glyphs( HB_Buffer buffer,
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyphs( HB_Buffer buffer,
FT_UShort num_in,
FT_UShort num_out,
FT_UShort *glyph_data,
return HB_Err_Ok;
}
-HB_Error
-hb_buffer_add_output_glyph( HB_Buffer buffer,
- FT_UInt glyph_index,
- FT_UShort component,
- FT_UShort ligID )
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyph( HB_Buffer buffer,
+ FT_UInt glyph_index,
+ FT_UShort component,
+ FT_UShort ligID )
{
FT_UShort glyph_data = glyph_index;
- return hb_buffer_add_output_glyphs ( buffer, 1, 1,
+ return _hb_buffer_add_output_glyphs ( buffer, 1, 1,
&glyph_data, component, ligID );
}
-HB_Error
-hb_buffer_copy_output_glyph ( HB_Buffer buffer )
+HB_INTERNAL HB_Error
+_hb_buffer_copy_output_glyph ( HB_Buffer buffer )
{
HB_Error error;
return HB_Err_Ok;
}
-HB_Error
-hb_buffer_replace_output_glyph( HB_Buffer buffer,
- FT_UInt glyph_index,
- FT_Bool inplace )
+HB_INTERNAL HB_Error
+_hb_buffer_replace_output_glyph( HB_Buffer buffer,
+ FT_UInt glyph_index,
+ FT_Bool inplace )
{
HB_Error error;
if ( inplace )
{
- error = hb_buffer_copy_output_glyph ( buffer );
+ error = _hb_buffer_copy_output_glyph ( buffer );
if ( error )
return error;
}
else
{
- return hb_buffer_add_output_glyph( buffer, glyph_index, 0xFFFF, 0xFFFF );
+ return _hb_buffer_add_output_glyph( buffer, glyph_index, 0xFFFF, 0xFFFF );
}
return HB_Err_Ok;
}
-FT_UShort
-hb_buffer_allocate_ligid( HB_Buffer buffer )
+HB_INTERNAL FT_UShort
+_hb_buffer_allocate_ligid( HB_Buffer buffer )
{
return ++buffer->max_ligID;
}
/* harfbuzz-buffer.h: Buffer of glyphs for substitution/positioning
*
- * Copyrigh 2004 Red Hat Software
+ * Copyright 2004,7 Red Hat Software
*
* Portions Copyright 1996-2000 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
FT_BEGIN_HEADER
-#define HB_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
-
typedef struct HB_GlyphItemRec_ {
FT_UInt gindex;
FT_UInt properties;
hb_buffer_new( HB_Buffer *buffer );
void
-hb_buffer_swap( HB_Buffer buffer );
-
-void
hb_buffer_free( HB_Buffer buffer );
void
hb_buffer_clear( HB_Buffer buffer );
-void
-hb_buffer_clear_output( HB_Buffer buffer );
-
-HB_Error
-hb_buffer_clear_positions( HB_Buffer buffer );
-
HB_Error
hb_buffer_add_glyph( HB_Buffer buffer,
FT_UInt glyph_index,
FT_UInt properties,
FT_UInt cluster );
-HB_Error
-hb_buffer_add_output_glyphs( HB_Buffer buffer,
- FT_UShort num_in,
- FT_UShort num_out,
- FT_UShort *glyph_data,
- FT_UShort component,
- FT_UShort ligID );
-
-HB_Error
-hb_buffer_add_output_glyph ( HB_Buffer buffer,
- FT_UInt glyph_index,
- FT_UShort component,
- FT_UShort ligID );
-
-HB_Error
-hb_buffer_copy_output_glyph ( HB_Buffer buffer );
-
-HB_Error
-hb_buffer_replace_output_glyph ( HB_Buffer buffer,
- FT_UInt glyph_index,
- FT_Bool inplace );
-
-FT_UShort
-hb_buffer_allocate_ligid( HB_Buffer buffer );
-
FT_END_HEADER
#endif /* HARFBUZZ_BUFFER_H */
#ifndef HARFBUZZ_GDEF_PRIVATE_H
#define HARFBUZZ_GDEF_PRIVATE_H
+#include "harfbuzz-impl.h"
#include "harfbuzz-gdef.h"
#include "harfbuzz-buffer.h"
};
-HB_Error _HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
- FT_UShort glyphID,
- FT_UShort property );
+HB_INTERNAL HB_Error
+_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
+ FT_UShort glyphID,
+ FT_UShort property );
-HB_Error _HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
- HB_GlyphItem item,
- FT_UShort flags,
- FT_UShort* property );
+HB_INTERNAL HB_Error
+_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
+ HB_GlyphItem item,
+ FT_UShort flags,
+ FT_UShort* property );
FT_END_HEADER
FT_UShort glyphID,
FT_UShort* property )
{
- FT_UShort class, index;
+ FT_UShort class = 0, index = 0; /* shut compiler up */
HB_Error error;
}
-HB_Error _HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
- FT_UShort glyphID,
- FT_UShort property )
+HB_INTERNAL HB_Error
+_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
+ FT_UShort glyphID,
+ FT_UShort property )
{
HB_Error error;
- FT_UShort class, new_class, index;
+ FT_UShort class, new_class, index = 0; /* shut compiler up */
FT_UShort byte, bits, mask;
FT_UShort array_index, glyph_index, count;
}
-HB_Error _HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
- HB_GlyphItem gitem,
- FT_UShort flags,
- FT_UShort* property )
+HB_INTERNAL HB_Error
+_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
+ HB_GlyphItem gitem,
+ FT_UShort flags,
+ FT_UShort* property )
{
HB_Error error;
#ifndef HARFBUZZ_GPOS_PRIVATE_H
#define HARFBUZZ_GPOS_PRIVATE_H
+#include "harfbuzz-impl.h"
#include "harfbuzz-gpos.h"
FT_BEGIN_HEADER
-HB_Error _HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
- FT_Stream stream,
- FT_UShort lookup_type );
+HB_INTERNAL HB_Error
+_HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
+ FT_Stream stream,
+ FT_UShort lookup_type );
-void _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
- FT_UShort lookup_type );
+HB_INTERNAL void
+_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
+ FT_UShort lookup_type );
FT_END_HEADER
FT_UShort format2 )
{
HB_Error error;
- FT_UShort cl1, cl2;
+ FT_UShort cl1 = 0, cl2 = 0; /* shut compiler up */
HB_Class1Record* c1r;
HB_Class2Record* c2r;
}
-HB_Error _HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
- FT_Stream stream,
- FT_UShort lookup_type )
+HB_INTERNAL HB_Error
+_HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
+ FT_Stream stream,
+ FT_UShort lookup_type )
{
switch ( lookup_type ) {
case HB_GPOS_LOOKUP_SINGLE: return Load_SinglePos ( st, stream );
}
-void _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
- FT_UShort lookup_type )
+HB_INTERNAL void
+_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
+ FT_UShort lookup_type )
{
switch ( lookup_type ) {
case HB_GPOS_LOOKUP_SINGLE: Free_SinglePos ( st ); return;
if ( num_features )
{
- error = hb_buffer_clear_positions( buffer );
+ error = _hb_buffer_clear_positions( buffer );
if ( error )
return error;
}
#ifndef HARFBUZZ_GSUB_PRIVATE_H
#define HARFBUZZ_GSUB_PRIVATE_H
+#include "harfbuzz-impl.h"
#include "harfbuzz-gsub.h"
FT_BEGIN_HEADER
+HB_INTERNAL HB_Error
+_HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
+ FT_Stream stream,
+ FT_UShort lookup_type );
-HB_Error _HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
- FT_Stream stream,
- FT_UShort lookup_type );
-
-void _HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
- FT_UShort lookup_type );
+HB_INTERNAL void
+_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
+ FT_UShort lookup_type );
FT_END_HEADER
}
else
{
- FT_UShort ligID = hb_buffer_allocate_ligid( buffer );
+ FT_UShort ligID = _hb_buffer_allocate_ligid( buffer );
if ( ADD_String( buffer, i, 1, &lig->LigGlyph,
0xFFFF, ligID ) )
return error;
}
else
{
- FT_UShort ligID = hb_buffer_allocate_ligid( buffer );
+ FT_UShort ligID = _hb_buffer_allocate_ligid( buffer );
if ( ADD_Glyph( buffer, lig->LigGlyph, 0xFFFF, ligID ) )
return error;
}
-HB_Error _HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
- FT_Stream stream,
- FT_UShort lookup_type )
+HB_INTERNAL HB_Error
+_HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
+ FT_Stream stream,
+ FT_UShort lookup_type )
{
switch (lookup_type) {
case HB_GSUB_LOOKUP_SINGLE: return Load_SingleSubst ( st, stream );
}
-void _HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
- FT_UShort lookup_type )
+HB_INTERNAL void
+_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
+ FT_UShort lookup_type )
{
switch ( lookup_type ) {
case HB_GSUB_LOOKUP_SINGLE: Free_SingleSubst ( st ); return;
case HB_GSUB_LOOKUP_CHAIN:
/* in/out forward substitution (implemented lazy) */
- hb_buffer_clear_output ( buffer );
+ _hb_buffer_clear_output ( buffer );
buffer->in_pos = 0;
while ( buffer->in_pos < buffer->in_length )
{
* shouldn't matter in that case though.
*/
if ( retError == HB_Err_Ok )
- hb_buffer_swap( buffer );
+ _hb_buffer_swap( buffer );
return retError;
FT_BEGIN_HEADER
+#ifndef HB_INTERNAL
+# define HB_INTERNAL
+#endif
+
#ifndef NULL
# define NULL ((void *)0)
#endif
(property) ) ) != HB_Err_Ok )
#define ADD_String( buffer, num_in, num_out, glyph_data, component, ligID ) \
- ( ( error = hb_buffer_add_output_glyphs( (buffer), \
+ ( ( error = _hb_buffer_add_output_glyphs( (buffer), \
(num_in), (num_out), \
(glyph_data), (component), (ligID) \
) ) != HB_Err_Ok )
#define ADD_Glyph( buffer, glyph_index, component, ligID ) \
- ( ( error = hb_buffer_add_output_glyph( (buffer), \
+ ( ( error = _hb_buffer_add_output_glyph( (buffer), \
(glyph_index), (component), (ligID) \
) ) != HB_Err_Ok )
#define REPLACE_Glyph( buffer, glyph_index, nesting_level ) \
- ( ( error = hb_buffer_replace_output_glyph( (buffer), (glyph_index), \
+ ( ( error = _hb_buffer_replace_output_glyph( (buffer), (glyph_index), \
(nesting_level) == 1 ) ) != HB_Err_Ok )
#define COPY_Glyph( buffer ) \
- ( (error = hb_buffer_copy_output_glyph ( buffer ) ) != HB_Err_Ok )
+ ( (error = _hb_buffer_copy_output_glyph ( buffer ) ) != HB_Err_Ok )
FT_END_HEADER
#ifndef HARFBUZZ_OPEN_PRIVATE_H
#define HARFBUZZ_OPEN_PRIVATE_H
+#include "harfbuzz-impl.h"
#include "harfbuzz-open.h"
#include "harfbuzz-gsub-private.h"
#include "harfbuzz-gpos-private.h"
};
-HB_Error _HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
FT_Stream stream );
-HB_Error _HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
- FT_Stream input );
-HB_Error _HB_OPEN_Load_LookupList( HB_LookupList* ll,
- FT_Stream input,
- HB_Type type );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
+ FT_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_LookupList( HB_LookupList* ll,
+ FT_Stream input,
+ HB_Type type );
-HB_Error _HB_OPEN_Load_Coverage( HB_Coverage* c,
- FT_Stream input );
-HB_Error _HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
- FT_UShort limit,
- FT_Stream input );
-HB_Error _HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
- FT_UShort limit,
- FT_ULong class_offset,
- FT_ULong base_offset,
- FT_Stream stream );
-HB_Error _HB_OPEN_Load_Device( HB_Device* d,
- FT_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Coverage( HB_Coverage* c,
+ FT_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
+ FT_UShort limit,
+ FT_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
+ FT_UShort limit,
+ FT_ULong class_offset,
+ FT_ULong base_offset,
+ FT_Stream stream );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Device( HB_Device* d,
+ FT_Stream input );
-void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl );
-void _HB_OPEN_Free_FeatureList( HB_FeatureList* fl );
-void _HB_OPEN_Free_LookupList( HB_LookupList* ll,
- HB_Type type );
+HB_INTERNAL void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl );
+HB_INTERNAL void _HB_OPEN_Free_FeatureList( HB_FeatureList* fl );
+HB_INTERNAL void _HB_OPEN_Free_LookupList( HB_LookupList* ll,
+ HB_Type type );
-void _HB_OPEN_Free_Coverage( HB_Coverage* c );
-void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd );
-void _HB_OPEN_Free_Device( HB_Device* d );
+HB_INTERNAL void _HB_OPEN_Free_Coverage( HB_Coverage* c );
+HB_INTERNAL void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd );
+HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device* d );
-HB_Error _HB_OPEN_Coverage_Index( HB_Coverage* c,
- FT_UShort glyphID,
- FT_UShort* index );
-HB_Error _HB_OPEN_Get_Class( HB_ClassDefinition* cd,
- FT_UShort glyphID,
- FT_UShort* class,
- FT_UShort* index );
-HB_Error _HB_OPEN_Get_Device( HB_Device* d,
- FT_UShort size,
- FT_Short* value );
+HB_INTERNAL HB_Error
+_HB_OPEN_Coverage_Index( HB_Coverage* c,
+ FT_UShort glyphID,
+ FT_UShort* index );
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Class( HB_ClassDefinition* cd,
+ FT_UShort glyphID,
+ FT_UShort* klass,
+ FT_UShort* index );
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Device( HB_Device* d,
+ FT_UShort size,
+ FT_Short* value );
FT_END_HEADER
/* ScriptList */
-HB_Error _HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
+ FT_Stream stream )
{
HB_Error error;
}
-void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl )
+HB_INTERNAL void
+_HB_OPEN_Free_ScriptList( HB_ScriptList* sl )
{
FT_UShort n, count;
/* FeatureList */
-HB_Error _HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
+ FT_Stream stream )
{
HB_Error error;
}
-void _HB_OPEN_Free_FeatureList( HB_FeatureList* fl )
+HB_INTERNAL void
+_HB_OPEN_Free_FeatureList( HB_FeatureList* fl )
{
FT_UShort n, count;
/* LookupList */
-HB_Error _HB_OPEN_Load_LookupList( HB_LookupList* ll,
- FT_Stream stream,
- HB_Type type )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_LookupList( HB_LookupList* ll,
+ FT_Stream stream,
+ HB_Type type )
{
HB_Error error;
}
-void _HB_OPEN_Free_LookupList( HB_LookupList* ll,
- HB_Type type )
+HB_INTERNAL void
+_HB_OPEN_Free_LookupList( HB_LookupList* ll,
+ HB_Type type )
{
FT_UShort n, count;
}
-HB_Error _HB_OPEN_Load_Coverage( HB_Coverage* c,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Coverage( HB_Coverage* c,
+ FT_Stream stream )
{
HB_Error error;
}
-void _HB_OPEN_Free_Coverage( HB_Coverage* c )
+HB_INTERNAL void
+_HB_OPEN_Free_Coverage( HB_Coverage* c )
{
switch ( c->CoverageFormat )
{
}
-HB_Error _HB_OPEN_Coverage_Index( HB_Coverage* c,
- FT_UShort glyphID,
- FT_UShort* index )
+HB_INTERNAL HB_Error
+_HB_OPEN_Coverage_Index( HB_Coverage* c,
+ FT_UShort glyphID,
+ FT_UShort* index )
{
switch ( c->CoverageFormat )
{
/* ClassDefinition */
-HB_Error _HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
- FT_UShort limit,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
+ FT_UShort limit,
+ FT_Stream stream )
{
HB_Error error;
}
-static HB_Error _HB_OPEN_Load_EmptyClassDefinition( HB_ClassDefinition* cd )
+static HB_Error
+_HB_OPEN_Load_EmptyClassDefinition( HB_ClassDefinition* cd )
{
HB_Error error;
return error;
}
-HB_Error _HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
- FT_UShort limit,
- FT_ULong class_offset,
- FT_ULong base_offset,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
+ FT_UShort limit,
+ FT_ULong class_offset,
+ FT_ULong base_offset,
+ FT_Stream stream )
{
HB_Error error;
FT_ULong cur_offset;
return error;
}
-void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd )
+HB_INTERNAL void
+_HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd )
{
if ( !cd->loaded )
return;
static HB_Error Get_Class1( HB_ClassDefFormat1* cdf1,
FT_UShort glyphID,
- FT_UShort* class,
+ FT_UShort* klass,
FT_UShort* index )
{
FT_UShort* cva = cdf1->ClassValueArray;
if ( glyphID >= cdf1->StartGlyph &&
glyphID < cdf1->StartGlyph + cdf1->GlyphCount )
{
- *class = cva[glyphID - cdf1->StartGlyph];
+ *klass = cva[glyphID - cdf1->StartGlyph];
return HB_Err_Ok;
}
else
{
- *class = 0;
+ *klass = 0;
return HB_Err_Not_Covered;
}
}
static HB_Error Get_Class2( HB_ClassDefFormat2* cdf2,
FT_UShort glyphID,
- FT_UShort* class,
+ FT_UShort* klass,
FT_UShort* index )
{
HB_Error error = HB_Err_Ok;
if ( cdf2->ClassRangeCount == 0 )
{
- *class = 0;
+ *klass = 0;
if ( index )
*index = 0;
if ( glyphID >= crr[middle].Start && glyphID <= crr[middle].End )
{
- *class = crr[middle].Class;
+ *klass = crr[middle].Class;
error = HB_Err_Ok;
break;
}
{
if ( middle == min )
{
- *class = 0;
+ *klass = 0;
error = HB_Err_Not_Covered;
break;
}
{
if ( middle == max )
{
- *class = 0;
+ *klass = 0;
error = HB_Err_Not_Covered;
break;
}
}
-HB_Error _HB_OPEN_Get_Class( HB_ClassDefinition* cd,
- FT_UShort glyphID,
- FT_UShort* class,
- FT_UShort* index )
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Class( HB_ClassDefinition* cd,
+ FT_UShort glyphID,
+ FT_UShort* klass,
+ FT_UShort* index )
{
switch ( cd->ClassFormat )
{
- case 1: return Get_Class1( &cd->cd.cd1, glyphID, class, index );
- case 2: return Get_Class2( &cd->cd.cd2, glyphID, class, index );
+ case 1: return Get_Class1( &cd->cd.cd1, glyphID, klass, index );
+ case 2: return Get_Class2( &cd->cd.cd2, glyphID, klass, index );
default: return _hb_err(HB_Err_Invalid_SubTable_Format);
}
***************************/
-HB_Error _HB_OPEN_Load_Device( HB_Device* d,
- FT_Stream stream )
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Device( HB_Device* d,
+ FT_Stream stream )
{
HB_Error error;
}
-void _HB_OPEN_Free_Device( HB_Device* d )
+HB_INTERNAL void
+_HB_OPEN_Free_Device( HB_Device* d )
{
FREE( d->DeltaValue );
}
mask = 0x00FF */
-HB_Error _HB_OPEN_Get_Device( HB_Device* d,
- FT_UShort size,
- FT_Short* value )
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Device( HB_Device* d,
+ FT_UShort size,
+ FT_Short* value )
{
FT_UShort byte, bits, mask, f, s;
* See the file name COPYING for licensing information.
*
******************************************************************/
+#define HB_INTERNAL static
#include "ftglue.c"
#include "harfbuzz-open.c"
#include "harfbuzz-buffer.c"