Created
August 24, 2016 18:05
-
-
Save sorbits/057937a37c86a43d86d44f69a75fa23f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string fontStyle; | |
if(plist::get_key_path(plist, "settings.fontStyle", fontStyle)) | |
{ | |
bool hasPlain = fontStyle.find("plain") != std::string::npos; | |
bool hasBold = fontStyle.find("bold") != std::string::npos; | |
bool hasItalic = fontStyle.find("italic") != std::string::npos; | |
bool hasUnderline = fontStyle.find("underline") != std::string::npos; | |
res.bold = hasBold ? bool_true : (hasPlain ? bool_false : bool_unset); | |
res.italic = hasItalic ? bool_true : (hasPlain ? bool_false : bool_unset); | |
res.underlined = hasUnderline ? bool_true : (hasPlain ? bool_false : bool_unset); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment