diff options
Diffstat (limited to 'infinite.cpp')
-rw-r--r-- | infinite.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/infinite.cpp b/infinite.cpp index f79d201..0016178 100644 --- a/infinite.cpp +++ b/infinite.cpp | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <yaml-cpp/yaml.h> | 9 | #include <yaml-cpp/yaml.h> |
10 | #include <unistd.h> | 10 | #include <unistd.h> |
11 | #include <twitter.h> | 11 | #include <twitter.h> |
12 | #include <algorithm> | ||
12 | 13 | ||
13 | class fill_blanks { | 14 | class fill_blanks { |
14 | private: | 15 | private: |
@@ -731,12 +732,20 @@ int main(int argc, char** argv) | |||
731 | } | 732 | } |
732 | 733 | ||
733 | closedir(fontdir); | 734 | closedir(fontdir); |
735 | |||
736 | std::string font = fonts[rand() % fonts.size()]; | ||
737 | if (font == "Le_Super_Type_SemiBold.ttf") | ||
738 | { | ||
739 | std::transform(std::begin(action), std::end(action), std::begin(action), [] (char ch) { | ||
740 | return std::toupper(ch); | ||
741 | }); | ||
742 | } | ||
734 | 743 | ||
735 | Magick::Image textimage(Magick::Geometry(target_w, target_h), "transparent"); | 744 | Magick::Image textimage(Magick::Geometry(target_w, target_h), "transparent"); |
736 | textimage.type(Magick::TrueColorMatteType); | 745 | textimage.type(Magick::TrueColorMatteType); |
737 | textimage.fillColor(Magick::Color("white")); | 746 | textimage.fillColor(Magick::Color("white")); |
738 | textimage.fontPointsize(72.0); | 747 | textimage.fontPointsize(72.0); |
739 | textimage.font("fonts/" + fonts[rand() % fonts.size()]); | 748 | textimage.font("fonts/" + font); |
740 | 749 | ||
741 | auto words = verbly::split<std::list<std::string>>(action, " "); | 750 | auto words = verbly::split<std::list<std::string>>(action, " "); |
742 | std::string towrite = ""; | 751 | std::string towrite = ""; |