mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
CSS: text decorations support (underline & line-through)
This commit is contained in:
parent
c281770998
commit
29f1fd501b
4 changed files with 15 additions and 5 deletions
|
@ -159,6 +159,15 @@ shared_ptr<ZLTextStyleEntry> StyleSheetTable::createControl(const AttributeMap &
|
|||
}
|
||||
}
|
||||
|
||||
const std::vector<std::string> &deco = values(styles, "text-decoration");
|
||||
for (std::vector<std::string>::const_iterator it = deco.begin(); it != deco.end(); ++it) {
|
||||
if (*it == "underline") {
|
||||
entry->setFontModifier(ZLTextStyleEntry::FONT_MODIFIER_UNDERLINED, true);
|
||||
} else if (*it == "line-through") {
|
||||
entry->setFontModifier(ZLTextStyleEntry::FONT_MODIFIER_STRIKEDTHROUGH, true);
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<std::string> &bold = values(styles, "font-weight");
|
||||
if (!bold.empty()) {
|
||||
int num = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue