#pragma once #include #include class ASCIIArt { public: ASCIIArt(); struct Character { const char * c; double foreground; double background; double error; }; const Character & getCharacter(const unsigned char * address); const Character & getCharacter(const std::vector & values); private: std::unordered_map myAsciiPixels; struct Unicode { Unicode(const char * aC, std::vector aValues); const char * c; std::vector values; // foreground: top left - top right - bottom left - bottom right }; std::vector myGlyphs; static void fit(const std::vector & art, const Unicode & glyph, double & foreground, double & background, double & error); };