MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / Load

Method Load

include/FontUnmanaged.hpp:107–112  ·  view source on GitHub ↗

* Loads a font from a given file. * * @throws raylib::RaylibException Throws if the given font failed to initialize. */

Source from the content-addressed store, hash-verified

105 * @throws raylib::RaylibException Throws if the given font failed to initialize.
106 */
107 void Load(const std::string& fileName) {
108 set(::LoadFont(fileName.c_str()));
109 if (!IsValid()) {
110 throw RaylibException("Failed to load Font with from file: " + fileName);
111 }
112 }
113
114 /**
115 * Loads a font from a given file with generation parameters.

Callers

nothing calls this directly

Calls 3

RaylibExceptionClass · 0.85
c_strMethod · 0.80
IsValidFunction · 0.70

Tested by

no test coverage detected