MCPcopy Create free account
hub / github.com/InkboxSoftware/all-screen-keyboard / setFont

Method setFont

keyboard/src/graphics.cpp:855–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855int window::setFont(const char* fontName){
856 //check if file exists and is ttf
857 ifstream file(fontName);
858 if (strstr(fontName, ".ttf") == nullptr){
859 cout << fontName << " is not a ttf file" << endl;
860 return -1;
861 }
862 if (!file.good()){
863 cout << fontName << " file not found" << endl;
864 return -1;
865 }
866 currentFont = strdup(fontName);
867 return 0;
868}
869
870void window::setbackrgoundColor(int r, int g, int b, int a){
871 clearColor = createColor(r, g, b, a);

Callers 1

assignKeyboardFontMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected