Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addFontStyle() not working as expected? #569

Open
iget-master opened this issue Jul 6, 2015 · 1 comment
Open

addFontStyle() not working as expected? #569

iget-master opened this issue Jul 6, 2015 · 1 comment
Labels

Comments

@iget-master
Copy link

iget-master commented Jul 6, 2015

Just following PHPWord Sample01 until line 25 (https://github.com/PHPOffice/PHPWord/blob/develop/samples/Sample_01_SimpleText.php)
and output to HTML file

And it simply don't format my text correcty using "addFontStyle".

Output

<!DOCTYPE html>
  <!-- Generated by PHPWord -->
  <html>
  <head>
  <meta charset="UTF-8" />
  <title>PHPWord</title>
  <style>
  * {font-family: Arial; font-size: 10pt;}
  a.NoteRef {text-decoration: none;}
  hr {height: 1px; padding: 0; margin: 1em 0; border: 0; border-top: 1px solid #CCC;}
  table {border: 1px solid black; border-spacing: 0px; width: 100%;}
  td {border: 1px solid black;}
  .rStyle {font-size: 16pt; font-weight: bold; font-style: italic; text-decoration: line-through ;}
  .pStyle {margin-bottom: 5pt;}
  h1 {font-weight: bold;}
  </style>
  </head>
  <body>
  <h1>Welcome to PhpWord</h1>
  <p>Hello World!</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>I am styled by a font style definition.</p>
  <p>I am styled by a paragraph style definition.</p>
  <p>I am styled by both font and paragraph style.</p>
  </body>
  </html>

Using latest PHPWord version get from Composer.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@stevenmunro
Copy link

Is this still an issue? I'm confused. addFontStyle doesn't appear to be working with the latest release either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants