MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / InitFreeTypeLibrary

Function InitFreeTypeLibrary

src/SystemFonts.c:545–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543};
544
545static void InitFreeTypeLibrary(void) {
546 FT_Error err;
547 if (ft_lib) return;
548
549 ft_mem.alloc = FT_AllocWrapper;
550 ft_mem.free = FT_FreeWrapper;
551 ft_mem.realloc = FT_ReallocWrapper;
552
553 err = FT_New_Library(&ft_mem, &ft_lib);
554 if (err) Process_Abort2(err, "Failed to init freetype");
555 FT_Add_Default_Modules(ft_lib);
556}
557
558static cc_bool loadedPlatformFonts;
559/* Updates fonts list cache with platform's list of fonts */

Callers 2

SysFonts_LoadPlatformFunction · 0.85
SysFont_MakeFunction · 0.85

Calls 3

FT_New_LibraryFunction · 0.85
FT_Add_Default_ModulesFunction · 0.85
Process_Abort2Function · 0.70

Tested by

no test coverage detected