ReactOS  0.4.14-dev-1338-g0d187f7
afshaper.h File Reference
#include <ft2build.h>
Include dependency graph for afshaper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER FT_Error af_shaper_get_coverage (AF_FaceGlobals globals, AF_StyleClass style_class, FT_UShort *gstyles, FT_Bool default_script)
 
voidaf_shaper_buf_create (FT_Face face)
 
void af_shaper_buf_destroy (FT_Face face, void *buf)
 
const charaf_shaper_get_cluster (const char *p, AF_StyleMetrics metrics, void *buf_, unsigned int *count)
 
FT_ULong af_shaper_get_elem (AF_StyleMetrics metrics, void *buf_, unsigned int idx, FT_Long *x_advance, FT_Long *y_offset)
 

Function Documentation

◆ af_shaper_buf_create()

void* af_shaper_buf_create ( FT_Face  face)

Definition at line 592 of file afshaper.c.

593  {
594  FT_Error error;
595  FT_Memory memory = face->memory;
596  FT_ULong* buf;
597 
598 
599  FT_MEM_ALLOC( buf, sizeof ( FT_ULong ) );
600 
601  return (void*)buf;
602  }
int FT_Error
Definition: fttypes.h:300
unsigned long FT_ULong
Definition: fttypes.h:253
#define error(str)
Definition: mkdosfs.c:1605
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static char memory[1024 *256]
Definition: process.c:116
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
#define FT_MEM_ALLOC(ptr, size)
Definition: ftmemory.h:151
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by af_latin_metrics_check_digits(), af_latin_metrics_init_blues(), and af_latin_metrics_init_widths().

◆ af_shaper_buf_destroy()

void af_shaper_buf_destroy ( FT_Face  face,
void buf 
)

Definition at line 606 of file afshaper.c.

608  {
609  FT_Memory memory = face->memory;
610 
611 
612  FT_FREE( buf );
613  }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static char memory[1024 *256]
Definition: process.c:116
#define FT_FREE(ptr)
Definition: ftmemory.h:329
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by af_latin_metrics_check_digits(), af_latin_metrics_init_blues(), and af_latin_metrics_init_widths().

◆ af_shaper_get_cluster()

const char* af_shaper_get_cluster ( const char p,
AF_StyleMetrics  metrics,
void buf_,
unsigned int count 
)

Definition at line 617 of file afshaper.c.

621  {
622  FT_Face face = metrics->globals->face;
623  FT_ULong ch, dummy = 0;
624  FT_ULong* buf = (FT_ULong*)buf_;
625 
626 
627  while ( *p == ' ' )
628  p++;
629 
630  GET_UTF8_CHAR( ch, p );
631 
632  /* since we don't have an engine to handle clusters, */
633  /* we scan the characters but return zero */
634  while ( !( *p == ' ' || *p == '\0' ) )
635  GET_UTF8_CHAR( dummy, p );
636 
637  if ( dummy )
638  {
639  *buf = 0;
640  *count = 0;
641  }
642  else
643  {
644  *buf = FT_Get_Char_Index( face, ch );
645  *count = 1;
646  }
647 
648  return p;
649  }
unsigned long FT_ULong
Definition: fttypes.h:253
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLuint GLsizei count
Definition: gl.h:1545
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
Definition: ftobjs.c:3668
#define GET_UTF8_CHAR(ch, p)
Definition: afblue.h:31
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by af_latin_metrics_check_digits(), af_latin_metrics_init_blues(), and af_latin_metrics_init_widths().

◆ af_shaper_get_coverage()

FT_BEGIN_HEADER FT_Error af_shaper_get_coverage ( AF_FaceGlobals  globals,
AF_StyleClass  style_class,
FT_UShort gstyles,
FT_Bool  default_script 
)

Definition at line 577 of file afshaper.c.

581  {
582  FT_UNUSED( globals );
583  FT_UNUSED( style_class );
584  FT_UNUSED( gstyles );
585  FT_UNUSED( default_script );
586 
587  return FT_Err_Ok;
588  }
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

Referenced by af_face_globals_compute_style_coverage().

◆ af_shaper_get_elem()

FT_ULong af_shaper_get_elem ( AF_StyleMetrics  metrics,
void buf_,
unsigned int  idx,
FT_Long x_advance,
FT_Long y_offset 
)

Definition at line 653 of file afshaper.c.

658  {
659  FT_Face face = metrics->globals->face;
660  FT_ULong glyph_index = *(FT_ULong*)buf_;
661 
662  FT_UNUSED( idx );
663 
664 
665  if ( advance )
667  glyph_index,
671  advance );
672 
673  if ( y_offset )
674  *y_offset = 0;
675 
676  return glyph_index;
677  }
unsigned long FT_ULong
Definition: fttypes.h:253
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3010
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3009
FT_Get_Advance(FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance)
Definition: ftadvanc.c:75
unsigned int idx
Definition: utils.c:41
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
#define FT_LOAD_IGNORE_TRANSFORM
Definition: freetype.h:3019
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by af_latin_metrics_check_digits(), af_latin_metrics_init_blues(), and af_latin_metrics_init_widths().