Merge branch 'bring_back_bold_and_italic' of https://github.com/FBnil/PHPWord into bring_back_bold_and_italic

This commit is contained in:
troosan 2017-11-08 21:46:55 +01:00
commit c8b55b8e59
1 changed files with 14 additions and 0 deletions

View File

@ -388,6 +388,20 @@ class Html
}
$styles['italic'] = $tValue;
break;
case 'font-weight':
$tValue = false;
if (preg_match('#bold#', $cValue)) {
$tValue = true; // also match bolder
}
$styles['bold'] = $tValue;
break;
case 'font-style':
$tValue = false;
if (preg_match('#(?:italic|oblique)#', $cValue)) {
$tValue = true;
}
$styles['italic'] = $tValue;
break;
}
}