ReactOS 0.4.15-dev-7842-g558ab78
afshaper.c File Reference
#include <ft2build.h>
#include "afglobal.h"
#include "aftypes.h"
#include "afshaper.h"
Include dependency graph for afshaper.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 *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 {
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 }
#define FT_MEM_ALLOC(ptr, size)
Definition: ftmemory.h:151
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
unsigned long FT_ULong
Definition: fttypes.h:253
int FT_Error
Definition: fttypes.h:300
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:116

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 }
#define FT_FREE(ptr)
Definition: ftmemory.h:329

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' ) )
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 }
#define GET_UTF8_CHAR(ch, p)
Definition: afblue.h:31
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
Definition: ftobjs.c:3668
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLfloat GLfloat p
Definition: glext.h:8902

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

◆ af_shaper_get_coverage()

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 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 }
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
unsigned int idx
Definition: utils.c:41
#define FT_LOAD_IGNORE_TRANSFORM
Definition: freetype.h:3019
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3009
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3010
FT_Get_Advance(FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance)
Definition: ftadvanc.c:75

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