Rename FreeType font functions
This commit is contained in:
parent
9973dddbbd
commit
c9f17c4411
3 changed files with 6 additions and 6 deletions
|
@ -706,7 +706,7 @@ void InitTextObject(const char *name)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
font = LoadFont(path.c_str(), width, height);
|
font = LoadFreeTypeFont(path.c_str(), width, height);
|
||||||
#else
|
#else
|
||||||
std::string bitmap_path;
|
std::string bitmap_path;
|
||||||
std::string metadata_path;
|
std::string metadata_path;
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ static Glyph* GetGlyph(Font *font, unsigned long unicode_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FREETYPE_FONTS
|
#ifdef FREETYPE_FONTS
|
||||||
Font* LoadFontFromData(const unsigned char *data, size_t data_size, size_t cell_width, size_t cell_height)
|
Font* LoadFreeTypeFontFromData(const unsigned char *data, size_t data_size, size_t cell_width, size_t cell_height)
|
||||||
{
|
{
|
||||||
Font *font = (Font*)malloc(sizeof(Font));
|
Font *font = (Font*)malloc(sizeof(Font));
|
||||||
|
|
||||||
|
@ -1155,7 +1155,7 @@ Font* LoadFontFromData(const unsigned char *data, size_t data_size, size_t cell_
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Font* LoadFont(const char *font_filename, size_t cell_width, size_t cell_height)
|
Font* LoadFreeTypeFont(const char *font_filename, size_t cell_width, size_t cell_height)
|
||||||
{
|
{
|
||||||
Font *font = NULL;
|
Font *font = NULL;
|
||||||
|
|
||||||
|
@ -1164,7 +1164,7 @@ Font* LoadFont(const char *font_filename, size_t cell_width, size_t cell_height)
|
||||||
|
|
||||||
if (file_buffer != NULL)
|
if (file_buffer != NULL)
|
||||||
{
|
{
|
||||||
font = LoadFontFromData(file_buffer, file_size, cell_width, cell_height);
|
font = LoadFreeTypeFontFromData(file_buffer, file_size, cell_width, cell_height);
|
||||||
free(file_buffer);
|
free(file_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
typedef struct Font Font;
|
typedef struct Font Font;
|
||||||
|
|
||||||
#ifdef FREETYPE_FONTS
|
#ifdef FREETYPE_FONTS
|
||||||
Font* LoadFontFromData(const unsigned char *data, size_t data_size, size_t cell_width, size_t cell_height);
|
Font* LoadFreeTypeFontFromData(const unsigned char *data, size_t data_size, size_t cell_width, size_t cell_height);
|
||||||
Font* LoadFont(const char *font_filename, size_t cell_width, size_t cell_height);
|
Font* LoadFreeTypeFont(const char *font_filename, size_t cell_width, size_t cell_height);
|
||||||
#else
|
#else
|
||||||
Font* LoadBitmapFont(const char *bitmap_path, const char *metadata_path);
|
Font* LoadBitmapFont(const char *bitmap_path, const char *metadata_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue