diff --git a/coresdk/src/coresdk/text.cpp b/coresdk/src/coresdk/text.cpp index 232987b1..fe5d6fb3 100644 --- a/coresdk/src/coresdk/text.cpp +++ b/coresdk/src/coresdk/text.cpp @@ -32,42 +32,6 @@ namespace splashkit_lib return has_font(_fonts.find(name)->second); } - bool font_has_size(font fnt, int font_size) - { - if (has_font(fnt)) - { - return fnt->_data.count(font_size) > 0; - } - else - { - LOG(WARNING) << "Asking if font has size on invalid font."; - } - - return false; - } - - bool font_has_size(const string &name, int font_size) - { - return font_has_size(font_named(name), font_size); - } - - void font_load_size(font fnt, int font_size) - { - if (has_font(fnt)) - { - sk_add_font_size(fnt, font_size); - } - else - { - LOG(WARNING) << "font_load_size failed: font does not exist."; - } - } - - void font_load_size(const string &name, int font_size) - { - return font_load_size(font_named(name), font_size); - } - font font_named(string name) { if (has_font(name)) diff --git a/coresdk/src/coresdk/text.h b/coresdk/src/coresdk/text.h index 678454a2..48ff8ce8 100644 --- a/coresdk/src/coresdk/text.h +++ b/coresdk/src/coresdk/text.h @@ -129,25 +129,6 @@ namespace splashkit_lib * @attribute method load_size * @attribute self fnt */ - void font_load_size(font fnt, int font_size); - - /** - * @brief Loads a new size for an already loaded `font`. - * - * @param name The name of the `font` to load the size for. - * @param font_size The desired size of the `font`. - * - * @attribute suffix name_as_string - */ - void font_load_size(const string &name, int font_size); - - /** - * @brief Checks if the supplied `font` has been loaded. - * - * @param fnt The `font` to check if loaded. - * - * @returns Returns true if the specified `font` is loaded. - */ bool has_font(font fnt); /** @@ -173,27 +154,6 @@ namespace splashkit_lib * * @returns Returns true if the supplied `font` has the supplied size. */ - bool font_has_size(font fnt, int font_size); - - /** - * @brief Checks if the supplied `font` has the supplied size. - * - * @param name The name of the `font` to be checked. - * @param font_size The size to check. - * - * @attribute suffix name_as_string - * - * @returns Returns true if there is a font with the supplied name that has the supplied size. - */ - bool font_has_size(const string &name, int font_size); - - /** - * @brief Finds a loaded font that has the supplied name and returns it. - * - * @param name The name of the font to find. - * - * @returns Returns the font that has the supplied name. - */ font font_named(string name); /** diff --git a/coresdk/src/test/test_text.cpp b/coresdk/src/test/test_text.cpp index d2ec4c31..0341d14c 100644 --- a/coresdk/src/test/test_text.cpp +++ b/coresdk/src/test/test_text.cpp @@ -78,11 +78,7 @@ void test_font_auto_load() cout << "The next line should fail as the font has not been loaded." << endl; cout << flush; - font_load_size("fail", 20); - cout << "Checking is size 50 exists. Should be false: " << font_has_size("leaguegothic", 50) << endl; - font_load_size("leaguegothic", 50); - cout << "Checking if size 50 exists. Should be true: " << font_has_size("leaguegothic", 50) << endl; draw_text( "Preloaded... (UNDERLINE)", COLOR_BLACK,