#ifndef __SCEFONT_H__
#define __SCEFONT_H__

typedef void * SceFont_t_fontInfo;
typedef void * SceFont_t;

typedef struct SceFont_t_irect {
    u16 width;
    u16 height;
} SceFont_t_irect;

typedef struct SceFont_t_userImageBufferRec {
    u32 pixelFormat;
    int xPos64;
    int yPos64;
    SceFont_t_irect rect;
    u16 bytesPerLine;
    u16 reserved;
    u8 *buffer;
} SceFont_t_userImageBufferRec;

typedef struct SceFont_t_iGlyphMetricsInfo {
    u32 width64;
    u32 height64;
    int ascender64;
    int descender64;
    int horizontalBearingX64;
    int horizontalBearingY64;
    int verticalBearingX64;
    int verticalBearingY64;
    int horizontalAdvance64;
    int verticalAdvance64;
} SceFont_t_iGlyphMetricsInfo;

typedef struct SceFont_t_charInfo {
    u32 bitmapWidth;
    u32 bitmapHeight;
    u32 bitmapLeft;
    u32 bitmapTop;
    SceFont_t_iGlyphMetricsInfo glyphMetrics;
    u8 reserved0[2];
    u16 reserved1;
} SceFont_t_charInfo;

// (* sceFontCalcMemorySize) (__) = (void *) 0x09eb19bc;
void (* sceFontClose) (SceFont_t *font) = (void *) (BASE_OFFSET + 0xe6da0); // WTF is this function?
void (* sceFontDoneLib) (void) = (void *) (BASE_OFFSET + 0xe6d88); // WTF is this function?
// (* sceFontFindFont) (__) = (void *) 0x09eb19b8;
void (* sceFontFindOptimumFont) (void) = (void *) (BASE_OFFSET + 0xe6d90); // WTF is this function?
int (* sceFontGetCharGlyphImage) (void *fontid, short code, SceFont_t_userImageBufferRec *imagebuf) = (void *) (BASE_OFFSET + 0xe6db8);
// (* sceFontGetCharGlyphImage_Clip) (__) = (void *) 0x09eb19e4;
void (* sceFontGetCharImageRect) (__) = (void *) 0x09eb19dc;
int (* sceFontGetCharInfo) (SceFont_t *fpt, short code, SceFont_t_charInfo *charinfo) = (void *) (BASE_OFFSET + 0xe6db0); // WTF is this function?
void (* sceFontGetFontInfo) (void * fpt, SceFont_t_fontInfo * fontinfo) = (void *) (BASE_OFFSET + 0xe6da8);
// (* sceFontGetFontInfoByIndexNumber) (__) = (void *) 0x09eb19c0;
// (* sceFontGetFontList) (__) = (void *) 0x09eb19b0;
// (* sceFontGetNumFontList) (__) = (void *) 0x09eb19ac;
void (* sceFontGetShadowGlyphImage) (void *fontid, short code, SceFont_t_userImageBufferRec *imagebuf) = (void *) 0x09eb1a04;
// (* sceFontGetShadowGlyphImage_Clip) (__) = (void *) 0x09eb1a08;
// (* sceFontGetShadowImageRect) (__) = (void *) 0x09eb1a00;
void (* sceFontGetShadowInfo) (void *fpt, short code, SceFont_t_charInfo *charinfo) = (void *) 0x09eb19fc;
void * (* sceFontNewLib) (void *params, int *error) = (void *) (BASE_OFFSET + 0xe6d80);
void * (* sceFontOpen) (void *libid, int index, int mode, int *error) = (void *) (BASE_OFFSET + 0xe6d98);
void * (* sceFontOpenUserFile) (void *libid, const char *filename, int mode, int *error) = (void *) 0x09eb19c8;
void * (* sceFontOpenUserMemory) (void *libid, void *pbuf, int mode, int *error) = (void *) 0x09eb19cc;
// (* sceFontPixelToPointH) (__) = (void *) 0x09eb19e8;
// (* sceFontPixelToPointV) (__) = (void *) 0x09eb19ec;
// (* sceFontPointToPixelH) (__) = (void *) 0x09eb19f0;
// (* sceFontPointToPixelV) (__) = (void *) 0x09eb19f4;
// (* sceFontSetAltCharacterCode) (__) = (void *) 0x09eb19f8;
// (* sceFontSetResolution) (__) = (void *) 0x09eb19a8;
#endif
