MCPcopy Create free account
hub / github.com/defold/defold / LoadFont

Method LoadFont

engine/font/src/test/test_font.cpp:60–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void LoadFont(const char* path, HFont* out)
61 {
62 char buffer[512];
63 const char* host_path = dmTestUtil::MakeHostPath(buffer, sizeof(buffer), path);
64
65 HFont font = FontLoadFromPath(host_path);
66 ASSERT_NE((HFont)0, font);
67
68 const char* font_path = FontGetPath(font);
69 ASSERT_STREQ(host_path, font_path);
70
71 uint32_t path_hash = dmHashString32(host_path);
72 ASSERT_EQ(path_hash, FontGetPathHash(font));
73
74 *out = font;
75 }
76};
77
78TEST_F(FontTest, LoadTTF)

Callers

nothing calls this directly

Calls 4

MakeHostPathFunction · 0.85
FontLoadFromPathFunction · 0.85
FontGetPathFunction · 0.85
FontGetPathHashFunction · 0.85

Tested by

no test coverage detected