/**
@file text_reassemble.h libTERE headers.
See text_reassemble.c for notes
File: text_reassemble.h
Version: 0.0.13
Date: 06-FEB-2014
Author: David Mathog, Biology Division, Caltech
email: mathog@caltech.edu
Copyright: 2014 David Mathog and California Institute of Technology (Caltech)
*/
#ifndef _TEXT_REASSEMBLE_
#define _TEXT_REASSEMBLE_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <ctype.h>
#include <fontconfig/fontconfig.h>
#include <ft2build.h>
#include <iconv.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
/** \cond */
#define TEREMIN(A,B) (A < B ? A : B)
#define TEREMAX(A,B) (A > B ? A : B)
#ifndef M_PI
#endif
/** \endcond */
/** \defgroup color background options
Text is underwritten with the background color not at all,
by reassembled line, or by full assembly .
@{
*/
/** @} */
/** \defgroup decoration options
One of these values may be present in the decoration field.
Unused bits may be used by end user code.
These values are SVG specific. Other applications could use the text
decoration field for a different set of bits, so long as it provided its own
output function.
@{
*/
/** @} */
/** \defgroup text alignment types
Location of text's {X,Y} coordinate on bounding rectangle.
Values are compatible with Fontconfig.
@{
*/
/** @} */
/** \defgroup language direction types
@{
*/
/** @} */
/** \defgroup special processing flags
@{
*/
#define TR_EMFBOT 0x01 /**< use an approximation compatible with EMF file's "BOTTOM" text orientation, which is not the "bottom" for Freetype fonts */
/** @} */
/** \enum tr_classes
classification of complexes
@{
*/
enum tr_classes {
unknown justification properties */
};
/** @} */
/**
\brief alt font entries.
*/
typedef struct {
} ALT_SPECS;
/**
\brief Information for a font instance.
*/
typedef struct {
} FNT_SPECS;
/**
\brief Information for all font instances.
*/
typedef struct {
} FT_INFO;
typedef struct {
} TRCOLORREF;
/**
\brief Information for a single text object
*/
typedef struct {
double x; /**< x coordinate, relative to TR_INFO x,y, in points */
double y; /**< y coordinate, relative to TR_INFO x,y, in points */
element in a complex */
} TCHUNK_SPECS;
/**
\brief Information for all text objects.
*/
typedef struct {
} TP_INFO;
/**
\brief Information for a single bounding rectangle.
*/
typedef struct {
} BRECT_SPECS;
/**
\brief Information for all bounding rectangles.
*/
typedef struct {
} BR_INFO;
/**
\brief List of all members of a single complex.
*/
typedef struct {
for TR_TEXT or TR_LINE complexes also in cxi. For TR_TEXT
and TR_LINE these are indices to the actual text in tpi.) */
} CHILD_SPECS;
/**
\brief Information for a single complex.
*/
typedef struct {
idx refers to the tpi data. otherwise, cxi data */
} CX_SPECS;
/**
\brief Information for all complexes.
*/
typedef struct {
} CX_INFO;
/**
\brief Information for the entire text reassembly system.
*/
typedef struct {
double x; /**< x coordinate of first text object, in points */
double y; /**< y coordinate of first text object, in points */
} TR_INFO;
/* padding added to rectangles before overlap test */
/**
\brief Information for one padding record. (Padding is added to bounding rectangles before overlap tests.)
*/
typedef struct {
} RT_PAD;
/** \cond */
/*
iconv() has a funny cast on some older systems, on most recent ones
it is just char **. This tries to work around the issue. If you build this
on another funky system this code may need to be modified, or define ICONV_CAST
on the compile line(but it may be tricky).
*/
#ifdef SOL8
#define ICONV_CAST (const char **)
#endif //SOL8
#if !defined(ICONV_CAST)
#define ICONV_CAST (char **)
#endif //ICONV_CAST
/** \endcond */
/* Prototypes */
int TR_getadvance(FT_INFO *fti, FNT_SPECS *fsp, uint32_t wc, uint32_t pc, int load_flags, int kern_mode, int *ymin, int *ymax);
int TR_weight_FC_to_SVG(int weight);
FT_INFO *ftinfo_init(void);
CX_INFO *cxinfo_init(void);
TP_INFO *tpinfo_init(void);
BR_INFO *brinfo_init(void);
enum tr_classes
int is_mn_unicode(int test);
#ifdef __cplusplus
}
#endif
#endif /* _TEXT_REASSEMBLE_ */