示例#1
0
void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_size)
{
	FT_Open_Args open;

	open.flags = FT_OPEN_MEMORY;
	open.memory_base = (const FT_Byte *)mem;
	open.memory_size = mem_size;
	FT_Attach_Stream(font->face, &open);
}
示例#2
0
bool FTFace::Attach (const unsigned char *pBufferBytes, size_t bufferSizeInBytes) {
	FT_Open_Args open;

	open.flags = FT_OPEN_MEMORY;
	open.memory_base = (FT_Byte *)pBufferBytes;
	open.memory_size = (FT_Long)bufferSizeInBytes;

	err = FT_Attach_Stream (*ftFace, &open);
	return !err;
}