Merge branch 'bring_back_bold_and_italic' of https://github.com/FBnil/PHPWord into bring_back_bold_and_italic
This commit is contained in:
commit
d8dcc770a9
|
|
@ -381,6 +381,20 @@ class Html
|
|||
case 'background-color':
|
||||
$styles['bgColor'] = trim($cValue, '#');
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue