fix(fonts): Default offset to 0 if not specified

This commit is contained in:
Michael Carlberg 2016-05-24 00:49:35 +02:00
parent 32f274c88a
commit 92e1216574

View File

@ -128,6 +128,8 @@ Bar::Bar()
for (auto f : config::get_list<std::string>(this->config_path, "font")) { for (auto f : config::get_list<std::string>(this->config_path, "font")) {
std::vector<std::string> font; std::vector<std::string> font;
string::split_into(f, ';', font); string::split_into(f, ';', font);
if (font.size() < 2)
font.emplace_back("0");
this->opts->fonts.emplace_back(std::make_unique<Font>(font[0], std::stoi(font[1]))); this->opts->fonts.emplace_back(std::make_unique<Font>(font[0], std::stoi(font[1])));
} }
} }