Leptonica 1.68
C Image Processing Library
|
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 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) |
FT_LIBRARY * | ftInitLibrary (void) |
void | ftShutdownLibrary (FT_LIBRARY *lib_ptr) |
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) |
Display freetype fonts in a pix.
static l_int32 ftUtfToUniChar() static PIX *ftDrawBitmap() FT_LIBRARY *ftInitLibrary() void ftShutdownLibrary() PIX *pixWriteTTFText()
Definition in file freetype.c.
#define MAX | ( | a, | |
b | |||
) | (((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().
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 | ||
) |
Definition at line 213 of file freetype.c.
References ERROR_PTR, ftDrawBitmap(), ftUtfToUniChar(), image, LEPTONICA_FT_RESOLUTION, ft_library_st::library, NULL, pixConvertTo32(), pixCopy(), pixDestroy(), pixGetData(), pixGetDepth(), pixGetHeight(), pixGetWidth(), PROCNAME, ROUNDUPDOWN, x1, and y1.