File: freetypeharfbuzz.c

package info (click to toggle)
r-cran-freetypeharfbuzz 0.2.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: ansic: 370; sh: 74; makefile: 61
file content (23 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#define R_NO_REMAP
#include <Rinternals.h>

#include <freetypeharfbuzz.h>


int (*fthb_get_font_info)(const char*, double, struct fthb_font_info*) = NULL;
int (*fthb_calc_string_info)(const char*, const char*, double, struct fthb_string_info*) = NULL;
int (*fthb_calc_string_width)(const char*, const char*, double, double*) = NULL;

void fthb_init() {
  fthb_get_font_info =
    (int (*)(const char*, double, struct fthb_font_info*))
    R_GetCCallable("freetypeharfbuzz", "fthb_get_font_info");

  fthb_calc_string_info =
    (int (*)(const char*, const char*, double, struct fthb_string_info*))
    R_GetCCallable("freetypeharfbuzz", "fthb_calc_string_info");

  fthb_calc_string_width =
    (int (*)(const char*, const char*, double, double*))
    R_GetCCallable("freetypeharfbuzz", "fthb_calc_string_width");
}