Codex's updates...

This commit is contained in:
2026-10-18 19:27:17 -04:00
parent a1643eb1b7
commit 02223083f6
338 changed files with 14757 additions and 7986 deletions
@@ -49,11 +49,12 @@ class Drawing
// Font name and size
$name = $defaultFont->getName();
$size = $defaultFont->getSize();
$sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : "$size";
if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$size])) {
if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex])) {
// Exact width can be determined
return $pixelValue * Font::DEFAULT_COLUMN_WIDTHS[$name][$size]['width']
/ Font::DEFAULT_COLUMN_WIDTHS[$name][$size]['px'];
return $pixelValue * Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['width']
/ Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['px'];
}
// We don't have data for this particular font and size, use approximation by
@@ -75,11 +76,12 @@ class Drawing
// Font name and size
$name = $defaultFont->getName();
$size = $defaultFont->getSize();
$sizex = ($size !== null && $size == (int) $size) ? ((int) $size) : "$size";
if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$size])) {
if (isset(Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex])) {
// Exact width can be determined
$colWidth = $cellWidth * Font::DEFAULT_COLUMN_WIDTHS[$name][$size]['px']
/ Font::DEFAULT_COLUMN_WIDTHS[$name][$size]['width'];
$colWidth = $cellWidth * Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['px']
/ Font::DEFAULT_COLUMN_WIDTHS[$name][$sizex]['width'];
} else {
// We don't have data for this particular font and size, use approximation by
// extrapolating from Calibri 11
@@ -114,11 +116,7 @@ class Drawing
*/
public static function pointsToPixels($pointValue): int
{
if ($pointValue != 0) {
return (int) ceil($pointValue / 0.75);
}
return 0;
return (int) ceil($pointValue / 0.75);
}
/**