5#include "testing/font_renamer.h"
9#include "testing/test_fonts.h"
13FPDF_SYSFONTINFO* GetImpl(FPDF_SYSFONTINFO* info) {
14 return static_cast<FontRenamer*>(info)
->impl();
17void ReleaseImpl(FPDF_SYSFONTINFO* info) {
18 FPDF_SYSFONTINFO* impl = GetImpl(info);
22void EnumFontsImpl(FPDF_SYSFONTINFO* info,
void* mapper) {
23 FPDF_SYSFONTINFO* impl = GetImpl(info);
27void* MapFontImpl(FPDF_SYSFONTINFO* info,
35 FPDF_SYSFONTINFO* impl = GetImpl(info);
37 renamed_face.c_str()
, exact
);
40void* GetFontImpl(FPDF_SYSFONTINFO* info,
const char* face) {
42 FPDF_SYSFONTINFO* impl = GetImpl(info);
47unsigned long GetFontDataImpl(FPDF_SYSFONTINFO* info,
50 unsigned char* buffer,
51 unsigned long buf_size) {
52 FPDF_SYSFONTINFO* impl = GetImpl(info);
56unsigned long GetFaceNameImpl(FPDF_SYSFONTINFO* info,
59 unsigned long buf_size) {
60 FPDF_SYSFONTINFO* impl = GetImpl(info);
64int GetFontCharsetImpl(FPDF_SYSFONTINFO* info,
void* font) {
65 FPDF_SYSFONTINFO* impl = GetImpl(info);
69void DeleteFontImpl(FPDF_SYSFONTINFO* info,
void* font) {
70 FPDF_SYSFONTINFO* impl = GetImpl(info);
86 FPDF_SetSystemFontInfo(
this);
90 FPDF_FreeDefaultSystemFontInfo(impl_.ExtractAsDangling());
FPDF_SYSFONTINFO * impl()
static std::string RenameFont(const char *face)
void(* Release)(struct _FPDF_SYSFONTINFO *pThis)
void(* DeleteFont)(struct _FPDF_SYSFONTINFO *pThis, void *hFont)
unsigned long(* GetFontData)(struct _FPDF_SYSFONTINFO *pThis, void *hFont, unsigned int table, unsigned char *buffer, unsigned long buf_size)
void *(* GetFont)(struct _FPDF_SYSFONTINFO *pThis, const char *face)
unsigned long(* GetFaceName)(struct _FPDF_SYSFONTINFO *pThis, void *hFont, char *buffer, unsigned long buf_size)
int(* GetFontCharset)(struct _FPDF_SYSFONTINFO *pThis, void *hFont)
void(* EnumFonts)(struct _FPDF_SYSFONTINFO *pThis, void *pMapper)
void *(* MapFont)(struct _FPDF_SYSFONTINFO *pThis, int weight, FPDF_BOOL bItalic, int charset, int pitch_family, const char *face, FPDF_BOOL *bExact)