Skip to content

addListItem FontStyle doesn't take effect #2761

Open
@ca-dsgn

Description

@ca-dsgn

Describe the bug and add attachments

From your sample code:
https://github.com/PHPOffice/PHPWord/blob/master/samples/Sample_14_ListItem.php

`$phpWord->addFontStyle(
"normal",
array('name' => 'Futura', 'size' => 11, 'color' => '000')
);

$phpWord->addNumberingStyle(
"index_list",
[
'type' => 'multilevel',
'levels' => [
['format' => 'decimal', 'text' => '[%1]', 'left' => 360, 'hanging' => 360, 'tabPos' => 360],
],
]
);

$section->addListItem('List item 1.', 0, "normal", "index_list");`

The FontStyle (font-family: Futura, font-size: 11 and color 000 doesn't take effect).

Expected behavior

FontStyle should take effect.

Steps to reproduce

`$phpWord->addFontStyle(
"normal",
array('name' => 'Futura', 'size' => 11, 'color' => '000')
);

$phpWord->addNumberingStyle(
"index_list",
[
'type' => 'multilevel',
'levels' => [
['format' => 'decimal', 'text' => '[%1]', 'left' => 360, 'hanging' => 360, 'tabPos' => 360],
],
]
);

$section->addListItem('List item 1.', 0, "normal", "index_list");`

PHPWord version(s) where the bug happened

1.3

PHP version(s) where the bug happened

8.3

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions