summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-05-11 17:37:29 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-05-11 17:37:29 -0400
commitd0ea726c09a200ba73706323d6eab10ef4a618cc (patch)
tree53d5f9dd7ae3a82ee6cd90b4e19ac158d96a5900
parentb6ef2780013634799c5e5d371c8a13f453c7a4ee (diff)
downloadinfinite-d0ea726c09a200ba73706323d6eab10ef4a618cc.tar.gz
infinite-d0ea726c09a200ba73706323d6eab10ef4a618cc.tar.bz2
infinite-d0ea726c09a200ba73706323d6eab10ef4a618cc.zip
Added a new font
-rwxr-xr-xfonts/Le_Super_Type_SemiBold.ttfbin0 -> 105532 bytes
-rw-r--r--infinite.cpp11
2 files changed, 10 insertions, 1 deletions
diff --git a/fonts/Le_Super_Type_SemiBold.ttf b/fonts/Le_Super_Type_SemiBold.ttf new file mode 100755 index 0000000..3171f63 --- /dev/null +++ b/fonts/Le_Super_Type_SemiBold.ttf
Binary files differ
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
13class fill_blanks { 14class 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 = "";