You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the following lines to my code and pair it with setAuto things should work.
Font::setTrueTypeFontPath("/usr/share/fonts/msttcore/");
Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_EXACT);
...// Apply auto size to all columnsforeach (range('A',$workSheetMaxColumns) as$col) { $worksheet->getColumnDimension($col)->setAutoSize(true); }
What is the current behavior?
When running this on my web server (CentOS) I had 2 issues:
TrueType fonts were not installed on the CentOS system. I was able to have our admin install the msttcore fonts.
Now the real issue is that starting on line 43 some of the fonts are in all uppercase. Since Linux is case sensitive an exception is raised at line 514 since the font can not be found. In the msttcore directory all the *.tff files are lowercase.
Which versions of PhpSpreadsheet and PHP are affected?
version 1.18.0 and master branch
Suggested Fixes
Lowercase the CALIBRI font names (Line 48-51) (most other font filenames are all lowercase)
This is:
What is the expected behavior?
When adding the following lines to my code and pair it with setAuto things should work.
What is the current behavior?
When running this on my web server (CentOS) I had 2 issues:
Which versions of PhpSpreadsheet and PHP are affected?
version 1.18.0 and master branch
Suggested Fixes
$fontFile = self::$trueTypeFontPath . strtolower($fontFile);
The text was updated successfully, but these errors were encountered: