Skip to content

Commit db52525

Browse files
committed
GH-89 : Example in README.md is broken
1 parent ebb7d04 commit db52525

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ $PHPWord->addFontStyle('myOwnStyle', array('name'=>'Verdana', 'size'=>14, 'color
6363
$section->addText('Hello world! I am formatted by a user defined style', 'myOwnStyle');
6464

6565
// You can also putthe appended element to local object an call functions like this:
66+
$fontStyle = new PHPWord_Style_Font();
67+
$fontStyle->setBold(true);
68+
$fontStyle->setName('Verdana');
69+
$fontStyle->setSize(22);
6670
$myTextElement = $section->addText('Hello World!');
67-
$myTextElement->setBold();
68-
$myTextElement->setName('Verdana');
69-
$myTextElement->setSize(22);
71+
$myTextElement->setFontStyle($fontStyle);
7072

7173
// At least write the document to webspace:
7274
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Changes in branch for release 0.7.1 :
2626
- Bugfix: (gabrielbull) - Fixed bug with cell styling
2727
- Bugfix: (gabrielbull) - Fixed bug list items inside of cells
2828
- Bugfix: (SiebelsTim) GH-51 - Adding a value that contains "&" in a template breaks it
29+
- Bugfix: (Progi1984) GH-89 - Example in README.md is broken
2930
- Feature: (RomanSyroeshko) GH-56 GH-57 - Template : Permit to save a template generated as a file (PHPWord_Template::saveAs())
3031
- Feature: (gabrielbull) - Word2007 : Support sections page numbering
3132
- Feature: (gabrielbull) - Word2007 : Added support for line height

0 commit comments

Comments
 (0)