// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// register_text_measurer
void register_text_measurer(SEXP fn);
RcppExport SEXP _gridmicrotex_register_text_measurer(SEXP fnSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fn(fnSEXP);
    register_text_measurer(fn);
    return R_NilValue;
END_RCPP
}
// clear_text_measurer
void clear_text_measurer();
RcppExport SEXP _gridmicrotex_clear_text_measurer() {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    clear_text_measurer();
    return R_NilValue;
END_RCPP
}
// microtex_init
void microtex_init(std::string clm_path, std::string otf_path);
RcppExport SEXP _gridmicrotex_microtex_init(SEXP clm_pathSEXP, SEXP otf_pathSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type clm_path(clm_pathSEXP);
    Rcpp::traits::input_parameter< std::string >::type otf_path(otf_pathSEXP);
    microtex_init(clm_path, otf_path);
    return R_NilValue;
END_RCPP
}
// microtex_init_from_otf
void microtex_init_from_otf(std::string otf_path, int index);
RcppExport SEXP _gridmicrotex_microtex_init_from_otf(SEXP otf_pathSEXP, SEXP indexSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type otf_path(otf_pathSEXP);
    Rcpp::traits::input_parameter< int >::type index(indexSEXP);
    microtex_init_from_otf(otf_path, index);
    return R_NilValue;
END_RCPP
}
// microtex_add_font
void microtex_add_font(std::string clm_path, std::string otf_path);
RcppExport SEXP _gridmicrotex_microtex_add_font(SEXP clm_pathSEXP, SEXP otf_pathSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type clm_path(clm_pathSEXP);
    Rcpp::traits::input_parameter< std::string >::type otf_path(otf_pathSEXP);
    microtex_add_font(clm_path, otf_path);
    return R_NilValue;
END_RCPP
}
// microtex_math_font_names
std::vector<std::string> microtex_math_font_names();
RcppExport SEXP _gridmicrotex_microtex_math_font_names() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(microtex_math_font_names());
    return rcpp_result_gen;
END_RCPP
}
// microtex_set_default_math_font
bool microtex_set_default_math_font(std::string name);
RcppExport SEXP _gridmicrotex_microtex_set_default_math_font(SEXP nameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type name(nameSEXP);
    rcpp_result_gen = Rcpp::wrap(microtex_set_default_math_font(name));
    return rcpp_result_gen;
END_RCPP
}
// microtex_bidi_available
bool microtex_bidi_available();
RcppExport SEXP _gridmicrotex_microtex_bidi_available() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(microtex_bidi_available());
    return rcpp_result_gen;
END_RCPP
}
// microtex_release
void microtex_release();
RcppExport SEXP _gridmicrotex_microtex_release() {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    microtex_release();
    return R_NilValue;
END_RCPP
}
// microtex_is_inited
bool microtex_is_inited();
RcppExport SEXP _gridmicrotex_microtex_is_inited() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(microtex_is_inited());
    return rcpp_result_gen;
END_RCPP
}
// microtex_version
std::string microtex_version();
RcppExport SEXP _gridmicrotex_microtex_version() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(microtex_version());
    return rcpp_result_gen;
END_RCPP
}
// microtex_set_default_main_font
bool microtex_set_default_main_font(std::string family);
RcppExport SEXP _gridmicrotex_microtex_set_default_main_font(SEXP familySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type family(familySEXP);
    rcpp_result_gen = Rcpp::wrap(microtex_set_default_main_font(family));
    return rcpp_result_gen;
END_RCPP
}
// microtex_main_font_families
std::vector<std::string> microtex_main_font_families();
RcppExport SEXP _gridmicrotex_microtex_main_font_families() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(microtex_main_font_families());
    return rcpp_result_gen;
END_RCPP
}
// ot_math_table_bytes
SEXP ot_math_table_bytes(std::string path, int index);
RcppExport SEXP _gridmicrotex_ot_math_table_bytes(SEXP pathSEXP, SEXP indexSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type path(pathSEXP);
    Rcpp::traits::input_parameter< int >::type index(indexSEXP);
    rcpp_result_gen = Rcpp::wrap(ot_math_table_bytes(path, index));
    return rcpp_result_gen;
END_RCPP
}
// otf_to_clm_bytes
Rcpp::RawVector otf_to_clm_bytes(std::string path, int index);
RcppExport SEXP _gridmicrotex_otf_to_clm_bytes(SEXP pathSEXP, SEXP indexSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type path(pathSEXP);
    Rcpp::traits::input_parameter< int >::type index(indexSEXP);
    rcpp_result_gen = Rcpp::wrap(otf_to_clm_bytes(path, index));
    return rcpp_result_gen;
END_RCPP
}
// microtex_add_font_from_otf
std::string microtex_add_font_from_otf(std::string otf_path, int index);
RcppExport SEXP _gridmicrotex_microtex_add_font_from_otf(SEXP otf_pathSEXP, SEXP indexSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type otf_path(otf_pathSEXP);
    Rcpp::traits::input_parameter< int >::type index(indexSEXP);
    rcpp_result_gen = Rcpp::wrap(microtex_add_font_from_otf(otf_path, index));
    return rcpp_result_gen;
END_RCPP
}
// parse_latex_cpp
Rcpp::List parse_latex_cpp(std::string tex, float text_size, float line_space, std::string fg_color, float max_width, std::string math_font, std::string main_font, bool use_path, std::string tex_style, bool justify, bool optimal_break);
RcppExport SEXP _gridmicrotex_parse_latex_cpp(SEXP texSEXP, SEXP text_sizeSEXP, SEXP line_spaceSEXP, SEXP fg_colorSEXP, SEXP max_widthSEXP, SEXP math_fontSEXP, SEXP main_fontSEXP, SEXP use_pathSEXP, SEXP tex_styleSEXP, SEXP justifySEXP, SEXP optimal_breakSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type tex(texSEXP);
    Rcpp::traits::input_parameter< float >::type text_size(text_sizeSEXP);
    Rcpp::traits::input_parameter< float >::type line_space(line_spaceSEXP);
    Rcpp::traits::input_parameter< std::string >::type fg_color(fg_colorSEXP);
    Rcpp::traits::input_parameter< float >::type max_width(max_widthSEXP);
    Rcpp::traits::input_parameter< std::string >::type math_font(math_fontSEXP);
    Rcpp::traits::input_parameter< std::string >::type main_font(main_fontSEXP);
    Rcpp::traits::input_parameter< bool >::type use_path(use_pathSEXP);
    Rcpp::traits::input_parameter< std::string >::type tex_style(tex_styleSEXP);
    Rcpp::traits::input_parameter< bool >::type justify(justifySEXP);
    Rcpp::traits::input_parameter< bool >::type optimal_break(optimal_breakSEXP);
    rcpp_result_gen = Rcpp::wrap(parse_latex_cpp(tex, text_size, line_space, fg_color, max_width, math_font, main_font, use_path, tex_style, justify, optimal_break));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_gridmicrotex_register_text_measurer", (DL_FUNC) &_gridmicrotex_register_text_measurer, 1},
    {"_gridmicrotex_clear_text_measurer", (DL_FUNC) &_gridmicrotex_clear_text_measurer, 0},
    {"_gridmicrotex_microtex_init", (DL_FUNC) &_gridmicrotex_microtex_init, 2},
    {"_gridmicrotex_microtex_init_from_otf", (DL_FUNC) &_gridmicrotex_microtex_init_from_otf, 2},
    {"_gridmicrotex_microtex_add_font", (DL_FUNC) &_gridmicrotex_microtex_add_font, 2},
    {"_gridmicrotex_microtex_math_font_names", (DL_FUNC) &_gridmicrotex_microtex_math_font_names, 0},
    {"_gridmicrotex_microtex_set_default_math_font", (DL_FUNC) &_gridmicrotex_microtex_set_default_math_font, 1},
    {"_gridmicrotex_microtex_bidi_available", (DL_FUNC) &_gridmicrotex_microtex_bidi_available, 0},
    {"_gridmicrotex_microtex_release", (DL_FUNC) &_gridmicrotex_microtex_release, 0},
    {"_gridmicrotex_microtex_is_inited", (DL_FUNC) &_gridmicrotex_microtex_is_inited, 0},
    {"_gridmicrotex_microtex_version", (DL_FUNC) &_gridmicrotex_microtex_version, 0},
    {"_gridmicrotex_microtex_set_default_main_font", (DL_FUNC) &_gridmicrotex_microtex_set_default_main_font, 1},
    {"_gridmicrotex_microtex_main_font_families", (DL_FUNC) &_gridmicrotex_microtex_main_font_families, 0},
    {"_gridmicrotex_ot_math_table_bytes", (DL_FUNC) &_gridmicrotex_ot_math_table_bytes, 2},
    {"_gridmicrotex_otf_to_clm_bytes", (DL_FUNC) &_gridmicrotex_otf_to_clm_bytes, 2},
    {"_gridmicrotex_microtex_add_font_from_otf", (DL_FUNC) &_gridmicrotex_microtex_add_font_from_otf, 2},
    {"_gridmicrotex_parse_latex_cpp", (DL_FUNC) &_gridmicrotex_parse_latex_cpp, 11},
    {NULL, NULL, 0}
};

RcppExport void R_init_gridmicrotex(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
