Leptonica 1.68
C Image Processing Library

freetype.c File Reference

Display freetype fonts in a pix. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "allheaders.h"
#include <ft2build.h>

Go to the source code of this file.

Data Structures

struct  ft_library_st

Defines

#define MAX(a, b)   (((a)>(b))?(a):(b))
#define ROUNDUPDOWN(val, updown)   (!updown) ? (val < 0 ? ((val - 63) >> 6) : val >> 6) : (val > 0 ? ((val + 63) >> 6) : val >> 6)

Functions

static l_int32 ftUtfToUniChar (char *str, l_int32 *chPtr)
static PIXftDrawBitmap (l_uint32 *datad, l_uint32 color, FT_Bitmap bitmap, l_int32 pen_x, l_int32 pen_y, l_int32 width, l_int32 height)
FT_LIBRARYftInitLibrary (void)
void ftShutdownLibrary (FT_LIBRARY *lib_ptr)
PIXpixWriteTTFText (FT_LIBRARY *lib_ptr, PIX *pixs, l_float32 size, l_float32 angle, l_int32 x, l_int32 y, l_int32 letter_space, l_uint32 color, l_uint8 *fontfile, l_uint8 *text, l_int32 text_len, l_int32 *brect)

Detailed Description

Display freetype fonts in a pix.

Definition in file freetype.c.


Define Documentation

#define MAX (   a,
 
)    (((a)>(b))?(a):(b))

Definition at line 36 of file freetype.c.

#define ROUNDUPDOWN (   val,
  updown 
)    (!updown) ? (val < 0 ? ((val - 63) >> 6) : val >> 6) : (val > 0 ? ((val + 63) >> 6) : val >> 6)

Definition at line 38 of file freetype.c.

Referenced by pixWriteTTFText().


Function Documentation

static l_int32 ftUtfToUniChar ( char *  str,
l_int32 chPtr 
) [static]

Definition at line 45 of file freetype.c.

Referenced by pixWriteTTFText().

static PIX* ftDrawBitmap ( l_uint32 datad,
l_uint32  color,
FT_Bitmap  bitmap,
l_int32  pen_x,
l_int32  pen_y,
l_int32  width,
l_int32  height 
) [static]

Definition at line 118 of file freetype.c.

References ERROR_PTR, GET_DATA_BYTE, L_ALPHA_CHANNEL, NULL, PROCNAME, and SET_DATA_BYTE.

Referenced by pixWriteTTFText().

FT_LIBRARY* ftInitLibrary ( void  )

Definition at line 186 of file freetype.c.

References CALLOC, FREE, ft_library_st::library, and NULL.

void ftShutdownLibrary ( FT_LIBRARY lib_ptr)

Definition at line 203 of file freetype.c.

References FREE, and ft_library_st::library.

PIX* pixWriteTTFText ( FT_LIBRARY lib_ptr,
PIX pixs,
l_float32  size,
l_float32  angle,
l_int32  x,
l_int32  y,
l_int32  letter_space,
l_uint32  color,
l_uint8 fontfile,
l_uint8 text,
l_int32  text_len,
l_int32 brect 
)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines