We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fcdafee + 87a355b commit c8b55b8Copy full SHA for c8b55b8
src/PhpWord/Shared/Html.php
@@ -388,6 +388,20 @@ private static function parseStyle($attribute, $styles)
388
}
389
$styles['italic'] = $tValue;
390
break;
391
+ case 'font-weight':
392
+ $tValue = false;
393
+ if (preg_match('#bold#', $cValue)) {
394
+ $tValue = true; // also match bolder
395
+ }
396
+ $styles['bold'] = $tValue;
397
+ break;
398
+ case 'font-style':
399
400
+ if (preg_match('#(?:italic|oblique)#', $cValue)) {
401
+ $tValue = true;
402
403
+ $styles['italic'] = $tValue;
404
405
406
407
0 commit comments