From d0ea726c09a200ba73706323d6eab10ef4a618cc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 11 May 2016 17:37:29 -0400 Subject: Added a new font --- infinite.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'infinite.cpp') diff --git a/infinite.cpp b/infinite.cpp index f79d201..0016178 100644 --- a/infinite.cpp +++ b/infinite.cpp @@ -9,6 +9,7 @@ #include #include #include +#include class fill_blanks { private: @@ -731,12 +732,20 @@ int main(int argc, char** argv) } closedir(fontdir); + + std::string font = fonts[rand() % fonts.size()]; + if (font == "Le_Super_Type_SemiBold.ttf") + { + std::transform(std::begin(action), std::end(action), std::begin(action), [] (char ch) { + return std::toupper(ch); + }); + } Magick::Image textimage(Magick::Geometry(target_w, target_h), "transparent"); textimage.type(Magick::TrueColorMatteType); textimage.fillColor(Magick::Color("white")); textimage.fontPointsize(72.0); - textimage.font("fonts/" + fonts[rand() % fonts.size()]); + textimage.font("fonts/" + font); auto words = verbly::split>(action, " "); std::string towrite = ""; -- cgit 1.4.1