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 8bb9a99 + 6328b83 commit d8dcc77Copy full SHA for d8dcc77
src/PhpWord/Shared/Html.php
@@ -381,6 +381,20 @@ private static function parseStyle($attribute, $styles)
381
case 'background-color':
382
$styles['bgColor'] = trim($cValue, '#');
383
break;
384
+ case 'font-weight':
385
+ $tValue = false;
386
+ if (preg_match('#bold#', $cValue)) {
387
+ $tValue = true; // also match bolder
388
+ }
389
+ $styles['bold'] = $tValue;
390
+ break;
391
+ case 'font-style':
392
393
+ if (preg_match('#(?:italic|oblique)#', $cValue)) {
394
+ $tValue = true;
395
396
+ $styles['italic'] = $tValue;
397
398
}
399
400
0 commit comments