remove file

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-10 11:49:15 +03:00
parent f728d61f23
commit 465de1d0ea

View File

@@ -1,38 +0,0 @@
#include <cstdio>
#include <dlfcn.h>
#include <ft2build.h>
#include FT_FREETYPE_H
using FtInitFn = FT_Error (*)(FT_Library *);
using FtDoneFn = FT_Error (*)(FT_Library);
extern "C" FT_Error FT_Init_FreeType(FT_Library *library)
{
static FtInitFn real_fn
= reinterpret_cast<FtInitFn>(dlsym(RTLD_NEXT, "FT_Init_FreeType"));
if (!real_fn) {
std::fprintf(stderr,
"FT_Init_FreeType hook: failed to locate real symbol\n");
return FT_Err_Invalid_Handle;
}
FT_Error error = real_fn(library);
std::fprintf(stderr, "FT_Init_FreeType -> %p (err=%d)\n",
library ? static_cast<void *>(*library) : nullptr, error);
return error;
}
extern "C" FT_Error FT_Done_FreeType(FT_Library library)
{
static FtDoneFn real_fn
= reinterpret_cast<FtDoneFn>(dlsym(RTLD_NEXT, "FT_Done_FreeType"));
std::fprintf(stderr, "FT_Done_FreeType(%p)\n",
static_cast<void *>(library));
if (!real_fn) {
std::fprintf(stderr,
"FT_Done_FreeType hook: failed to locate real symbol\n");
return FT_Err_Invalid_Handle;
}
return real_fn(library);
}