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 --- fonts/Le_Super_Type_SemiBold.ttf | Bin 0 -> 105532 bytes infinite.cpp | 11 ++++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 fonts/Le_Super_Type_SemiBold.ttf diff --git a/fonts/Le_Super_Type_SemiBold.ttf b/fonts/Le_Super_Type_SemiBold.ttf new file mode 100755 index 0000000..3171f63 Binary files /dev/null and b/fonts/Le_Super_Type_SemiBold.ttf differ 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