#include "graphite2/Font.h"
#include "inc/Face.h"
#include "inc/FileFace.h"
#include "inc/GlyphCache.h"
#include "inc/CmapCache.h"
#include "inc/Silf.h"
#include "inc/json.h"
usingnamespacegraphite2;
#if !defined GRAPHITE2_NTRACING
extern json *global_log;
#endif
namespace
{
bool load_face(Face & face, unsigned int options)
{ … }
inline
uint32 zeropad(const uint32 x)
{ … }
}
extern "C" {
gr_face* gr_make_face_with_ops(const void* appFaceHandle, const gr_face_ops *ops, unsigned int faceOptions)
{ … }
gr_face* gr_make_face(const void* appFaceHandle, gr_get_table_fn tablefn, unsigned int faceOptions)
{ … }
gr_face* gr_make_face_with_seg_cache_and_ops(const void* appFaceHandle, const gr_face_ops *ops, unsigned int , unsigned int faceOptions)
{ … }
gr_face* gr_make_face_with_seg_cache(const void* appFaceHandle, gr_get_table_fn tablefn, unsigned int, unsigned int faceOptions)
{ … }
gr_uint32 gr_str_to_tag(const char *str)
{ … }
void gr_tag_to_str(gr_uint32 tag, char *str)
{ … }
gr_feature_val* gr_face_featureval_for_lang(const gr_face* pFace, gr_uint32 langname)
{ … }
const gr_feature_ref* gr_face_find_fref(const gr_face* pFace, gr_uint32 featId)
{ … }
unsigned short gr_face_n_fref(const gr_face* pFace)
{ … }
const gr_feature_ref* gr_face_fref(const gr_face* pFace, gr_uint16 i)
{ … }
unsigned short gr_face_n_languages(const gr_face* pFace)
{ … }
gr_uint32 gr_face_lang_by_index(const gr_face* pFace, gr_uint16 i)
{ … }
void gr_face_destroy(gr_face *face)
{ … }
gr_uint16 gr_face_name_lang_for_locale(gr_face *face, const char * locale)
{ … }
unsigned short gr_face_n_glyphs(const gr_face* pFace)
{ … }
const gr_faceinfo *gr_face_info(const gr_face *pFace, gr_uint32 script)
{ … }
int gr_face_is_char_supported(const gr_face* pFace, gr_uint32 usv, gr_uint32 script)
{ … }
#ifndef GRAPHITE2_NFILEFACE
gr_face* gr_make_file_face(const char *filename, unsigned int faceOptions)
{
FileFace* pFileFace = new FileFace(filename);
if (*pFileFace)
{
gr_face* pRes = gr_make_face_with_ops(pFileFace, &FileFace::ops, faceOptions);
if (pRes)
{
pRes->takeFileFace(pFileFace);
return pRes;
}
}
delete pFileFace;
return NULL;
}
gr_face* gr_make_file_face_with_seg_cache(const char* filename, unsigned int, unsigned int faceOptions)
{
return gr_make_file_face(filename, faceOptions);
}
#endif
}