Skip to content

Commit

Permalink
Ensure font size is integer, we do further calculations with it
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Dec 13, 2016
1 parent 034047a commit 4814498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libraries/plugins/schema/svg/Svg.php
Expand Up @@ -104,7 +104,7 @@ public function getFont()
/**
* Set document font size
*
* @param string $value sets the font size in pixels
* @param integer $value sets the font size in pixels
*
* @return void
*/
Expand All @@ -116,7 +116,7 @@ public function setFontSize($value)
/**
* Get document font size
*
* @return string returns the font size
* @return integer returns the font size
*/
public function getFontSize()
{
Expand Down Expand Up @@ -240,7 +240,7 @@ public function printElement(
$this->writeAttribute('style', $styles);
if (isset($text)) {
$this->writeAttribute('font-family', $this->font);
$this->writeAttribute('font-size', $this->fontSize);
$this->writeAttribute('font-size', $this->fontSize . 'px');
$this->text($text);
}
$this->endElement();
Expand Down
4 changes: 2 additions & 2 deletions libraries/plugins/schema/svg/SvgRelationSchema.php
Expand Up @@ -72,7 +72,7 @@ function __construct($db)
);
$this->diagram->SetAuthor('phpMyAdmin ' . PMA_VERSION);
$this->diagram->setFont('Arial');
$this->diagram->setFontSize('16px');
$this->diagram->setFontSize(16);

$alltables = $this->getTablesFromRequest();

Expand Down Expand Up @@ -264,4 +264,4 @@ private function _drawTables()
$table->tableDraw($this->showColor);
}
}
}
}

0 comments on commit 4814498

Please sign in to comment.