vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/pgf.h>


Link the library to the executable:

ScePgf_stub


Load the required module:

int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_PGF
Pgf module.
Definition: sysmodule.h:41



Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceFontLibHandle)
 
 VITASDK_BUILD_ASSERT_EQ (0x2C, SceFontNewLibParams)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceFontImageRect)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceFontGlyphImage)
 
 VITASDK_BUILD_ASSERT_EQ (0xA8, SceFontStyle)
 
 VITASDK_BUILD_ASSERT_EQ (0x3C, SceFontCharInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x108, SceFontInfo)
 
SceFontLibHandle sceFontNewLib (SceFontNewLibParams *params, unsigned int *errorCode)
 
int sceFontDoneLib (SceFontLibHandle libHandle)
 
SceFontHandle sceFontOpen (SceFontLibHandle libHandle, int index, int mode, unsigned int *errorCode)
 
SceFontHandle sceFontOpenUserMemory (SceFontLibHandle libHandle, void *pMemoryFont, SceSize pMemoryFontSize, unsigned int *errorCode)
 
SceFontHandle sceFontOpenUserFile (SceFontLibHandle libHandle, char *file, int mode, unsigned int *errorCode)
 
int sceFontClose (SceFontHandle fontHandle)
 
int sceFontGetNumFontList (SceFontLibHandle libHandle, unsigned int *errorCode)
 
int sceFontFindOptimumFont (SceFontLibHandle libHandle, SceFontStyle *fontStyle, unsigned int *errorCode)
 
int sceFontFindFont (SceFontLibHandle libHandle, SceFontStyle *fontStyle, unsigned int *errorCode)
 
int sceFontGetFontInfo (SceFontHandle fontHandle, SceFontInfo *fontInfo)
 
int sceFontGetFontInfoByIndexNumber (SceFontLibHandle libHandle, SceFontStyle *fontStyle, int unknown, int fontIndex)
 
int sceFontSetResolution (SceFontLibHandle libHandle, float hRes, float vRes)
 
int sceFontGetFontList (SceFontLibHandle libHandle, SceFontStyle *fontStyle, int numFonts)
 
int sceFontGetCharInfo (SceFontHandle fontHandle, unsigned int charCode, SceFontCharInfo *charInfo)
 
int sceFontGetCharImageRect (SceFontHandle fontHandle, unsigned int charCode, SceFontImageRect *charRect)
 
int sceFontGetCharGlyphImage (SceFontHandle fontHandle, unsigned int charCode, SceFontGlyphImage *glyphImage)
 
int sceFontGetCharGlyphImage_Clip (SceFontHandle fontHandle, unsigned int charCode, SceFontGlyphImage *glyphImage, int clipXPos, int clipYPos, int clipWidth, int clipHeight)
 
float sceFontPixelToPointH (SceFontLibHandle libHandle, float fontPixelsH, unsigned int *errorCode)
 
float sceFontPixelToPointV (SceFontLibHandle libHandle, float fontPixelsV, unsigned int *errorCode)
 
float sceFontPointToPixelH (SceFontLibHandle libHandle, float fontPointsH, unsigned int *errorCode)
 
float sceFontPointToPixelV (SceFontLibHandle libHandle, float fontPointsV, unsigned int *errorCode)
 
int sceFontSetAltCharacterCode (SceFontLibHandle libHandle, unsigned int charCode)
 
int sceFontFlush (SceFontHandle fontHandle)
 

Typedefs

typedef void * SceFontLibHandle
 
typedef void * SceFontHandle
 

Data Structure Documentation

◆ SceFontNewLibParams

struct SceFontNewLibParams

Data Fields

void * userData
 
unsigned int numFonts
 
void * cacheData
 
void *(* allocFunc )(void *, unsigned int)
 
void(* freeFunc )(void *, void *)
 
void * openFunc
 
void * closeFunc
 
void * readFunc
 
void * seekFunc
 
void * errorFunc
 
void * ioFinishFunc
 

◆ SceFontImageRect

struct SceFontImageRect
Data Fields
unsigned short width
unsigned short height

◆ SceFontGlyphImage

struct SceFontGlyphImage
Data Fields
unsigned int pixelFormat
int xPos64
int yPos64
unsigned short bufWidth
unsigned short bufHeight
unsigned short bytesPerLine
unsigned short pad
unsigned int bufferPtr

◆ SceFontStyle

struct SceFontStyle
Data Fields
float fontH
float fontV
float fontHRes
float fontVRes
float fontWeight
unsigned short fontFamily
unsigned short fontStyle
unsigned short fontStyleSub
unsigned short fontLanguage
unsigned short fontRegion
unsigned short fontCountry
char fontName[64]
char fontFileName[64]
unsigned int fontAttributes
unsigned int fontExpire

◆ SceFontCharInfo

struct SceFontCharInfo
Data Fields
unsigned int bitmapWidth
unsigned int bitmapHeight
unsigned int bitmapLeft
unsigned int bitmapTop
unsigned int sfp26Width
unsigned int sfp26Height
int sfp26Ascender
int sfp26Descender
int sfp26BearingHX
int sfp26BearingHY
int sfp26BearingVX
int sfp26BearingVY
int sfp26AdvanceH
int sfp26AdvanceV
short shadowFlags
short shadowId

◆ SceFontInfo

struct SceFontInfo
Data Fields
unsigned int maxGlyphWidthI
unsigned int maxGlyphHeightI
unsigned int maxGlyphAscenderI
unsigned int maxGlyphDescenderI
unsigned int maxGlyphLeftXI
unsigned int maxGlyphBaseYI
unsigned int minGlyphCenterXI
unsigned int maxGlyphTopYI
unsigned int maxGlyphAdvanceXI
unsigned int maxGlyphAdvanceYI
float maxGlyphWidthF
float maxGlyphHeightF
float maxGlyphAscenderF
float maxGlyphDescenderF
float maxGlyphLeftXF
float maxGlyphBaseYF
float minGlyphCenterXF
float maxGlyphTopYF
float maxGlyphAdvanceXF
float maxGlyphAdvanceYF
short maxGlyphWidth
short maxGlyphHeight
unsigned int charMapLength Number of elements in the font's charmap.
unsigned int shadowMapLength Number of elements in the font's shadow charmap.
SceFontStyle fontStyle
uint8_t BPP Font's BPP.
uint8_t pad[3]

Typedef Documentation

◆ SceFontLibHandle

typedef void* SceFontLibHandle

◆ SceFontHandle

typedef void* SceFontHandle

Enumeration Type Documentation

◆ SceFontErrorCode

Enumerator
SCE_FONT_ERROR_OUT_OF_MEMORY 
SCE_FONT_ERROR_INVALID_LIBID 
SCE_FONT_ERROR_INVALID_PARAMETER 
SCE_FONT_ERROR_HANDLER_OPEN_FAILED 
SCE_FONT_ERROR_TOO_MANY_OPEN_FONTS 
SCE_FONT_ERROR_INVALID_FONT_DATA 

◆ SceFontFamilyCode

Enumerator
SCE_FONT_FAMILY_DEFAULT 
SCE_FONT_FAMILY_SANS_SERIF 
SCE_FONT_FAMILY_SERIF 
SCE_FONT_FAMILY_ROUNDED 

◆ SceFontStyleCode

Enumerator
SCE_FONT_STYLE_DEFAULT 
SCE_FONT_STYLE_REGULAR 
SCE_FONT_STYLE_ITALIC 
SCE_FONT_STYLE_NARROW 
SCE_FONT_STYLE_NARROW_ITALIC 
SCE_FONT_STYLE_BOLD 
SCE_FONT_STYLE_BOLD_ITALIC 
SCE_FONT_STYLE_BLACK 
SCE_FONT_STYLE_BLACK_ITALIC 
SCE_FONT_STYLE_L 
SCE_FONT_STYLE_M 
SCE_FONT_STYLE_DB 

Demi-Bold / semi-bold.

SCE_FONT_STYLE_B 
SCE_FONT_STYLE_EB 
SCE_FONT_STYLE_UB 

◆ SceFontLanguageCode

Enumerator
SCE_FONT_LANGUAGE_DEFAULT 
SCE_FONT_LANGUAGE_JAPANESE 
SCE_FONT_LANGUAGE_LATIN 
SCE_FONT_LANGUAGE_KOREAN 
SCE_FONT_LANGUAGE_CHINESE 
SCE_FONT_LANGUAGE_CJK 

◆ SceFontPixelFormatCode

Enumerator
SCE_FONT_PIXELFORMAT_4 

2 pixels packed in 1 byte (natural order)

SCE_FONT_PIXELFORMAT_4_REV 

2 pixels packed in 1 byte (reversed order)

SCE_FONT_PIXELFORMAT_8 

1 pixel in 1 byte

SCE_FONT_PIXELFORMAT_24 

1 pixel in 3 bytes (RGB)

SCE_FONT_PIXELFORMAT_32 

1 pixel in 4 bytes (RGBA)

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/7]

VITASDK_BUILD_ASSERT_EQ ( ,
SceFontLibHandle   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/7]

VITASDK_BUILD_ASSERT_EQ ( 0x2C  ,
SceFontNewLibParams   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/7]

VITASDK_BUILD_ASSERT_EQ ( ,
SceFontImageRect   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/7]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceFontGlyphImage   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/7]

VITASDK_BUILD_ASSERT_EQ ( 0xA8  ,
SceFontStyle   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/7]

VITASDK_BUILD_ASSERT_EQ ( 0x3C  ,
SceFontCharInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/7]

VITASDK_BUILD_ASSERT_EQ ( 0x108  ,
SceFontInfo   
)

◆ sceFontNewLib()

SceFontLibHandle sceFontNewLib ( SceFontNewLibParams params,
unsigned int *  errorCode 
)

◆ sceFontDoneLib()

int sceFontDoneLib ( SceFontLibHandle  libHandle)

◆ sceFontOpen()

SceFontHandle sceFontOpen ( SceFontLibHandle  libHandle,
int  index,
int  mode,
unsigned int *  errorCode 
)

◆ sceFontOpenUserMemory()

SceFontHandle sceFontOpenUserMemory ( SceFontLibHandle  libHandle,
void *  pMemoryFont,
SceSize  pMemoryFontSize,
unsigned int *  errorCode 
)

◆ sceFontOpenUserFile()

SceFontHandle sceFontOpenUserFile ( SceFontLibHandle  libHandle,
char *  file,
int  mode,
unsigned int *  errorCode 
)

◆ sceFontClose()

int sceFontClose ( SceFontHandle  fontHandle)

◆ sceFontGetNumFontList()

int sceFontGetNumFontList ( SceFontLibHandle  libHandle,
unsigned int *  errorCode 
)

◆ sceFontFindOptimumFont()

int sceFontFindOptimumFont ( SceFontLibHandle  libHandle,
SceFontStyle fontStyle,
unsigned int *  errorCode 
)

◆ sceFontFindFont()

int sceFontFindFont ( SceFontLibHandle  libHandle,
SceFontStyle fontStyle,
unsigned int *  errorCode 
)

◆ sceFontGetFontInfo()

int sceFontGetFontInfo ( SceFontHandle  fontHandle,
SceFontInfo fontInfo 
)

◆ sceFontGetFontInfoByIndexNumber()

int sceFontGetFontInfoByIndexNumber ( SceFontLibHandle  libHandle,
SceFontStyle fontStyle,
int  unknown,
int  fontIndex 
)

◆ sceFontSetResolution()

int sceFontSetResolution ( SceFontLibHandle  libHandle,
float  hRes,
float  vRes 
)

◆ sceFontGetFontList()

int sceFontGetFontList ( SceFontLibHandle  libHandle,
SceFontStyle fontStyle,
int  numFonts 
)

◆ sceFontGetCharInfo()

int sceFontGetCharInfo ( SceFontHandle  fontHandle,
unsigned int  charCode,
SceFontCharInfo charInfo 
)

◆ sceFontGetCharImageRect()

int sceFontGetCharImageRect ( SceFontHandle  fontHandle,
unsigned int  charCode,
SceFontImageRect charRect 
)

◆ sceFontGetCharGlyphImage()

int sceFontGetCharGlyphImage ( SceFontHandle  fontHandle,
unsigned int  charCode,
SceFontGlyphImage glyphImage 
)

◆ sceFontGetCharGlyphImage_Clip()

int sceFontGetCharGlyphImage_Clip ( SceFontHandle  fontHandle,
unsigned int  charCode,
SceFontGlyphImage glyphImage,
int  clipXPos,
int  clipYPos,
int  clipWidth,
int  clipHeight 
)

◆ sceFontPixelToPointH()

float sceFontPixelToPointH ( SceFontLibHandle  libHandle,
float  fontPixelsH,
unsigned int *  errorCode 
)

◆ sceFontPixelToPointV()

float sceFontPixelToPointV ( SceFontLibHandle  libHandle,
float  fontPixelsV,
unsigned int *  errorCode 
)

◆ sceFontPointToPixelH()

float sceFontPointToPixelH ( SceFontLibHandle  libHandle,
float  fontPointsH,
unsigned int *  errorCode 
)

◆ sceFontPointToPixelV()

float sceFontPointToPixelV ( SceFontLibHandle  libHandle,
float  fontPointsV,
unsigned int *  errorCode 
)

◆ sceFontSetAltCharacterCode()

int sceFontSetAltCharacterCode ( SceFontLibHandle  libHandle,
unsigned int  charCode 
)

◆ sceFontFlush()

int sceFontFlush ( SceFontHandle  fontHandle)