Skip to content

Commit

Permalink
font-size pt unit support
Browse files Browse the repository at this point in the history
  • Loading branch information
ordinaryparksee committed Oct 8, 2020
1 parent db815c6 commit c36c5a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vaxy/table-to-excel",
"version": "0.0.9",
"version": "0.0.10",
"description": "Convert HTML Table to phpspreadsheet",
"authors": [
{
Expand Down
3 changes: 3 additions & 0 deletions src/TableToExcel/TableParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ public static function applyCellCss($sheet, $cell, $css)
if (preg_match('/px$/', $css['font-size']) > 0) {
$font->setSize(self::pixelToPoint(preg_replace('/px$/', '', $css['font-size'])));
}
else if (preg_match('/pt$/', $css['font-size']) > 0) {
$font->setSize(preg_replace('/pt$/', '', $css['font-size']));
}
else {
$font->setSize($css['font-size']);
}
Expand Down

0 comments on commit c36c5a6

Please sign in to comment.