Skip to content

Commit 3e8f6cd

Browse files
committed
Merge pull request #15635 from owncloud/issue/15634-empty-txt-previews
Scale up the font on larger previews
2 parents ce2c853 + 1592f25 commit 3e8f6cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/preview/txt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
5555

5656
$lines = preg_split("/\r\n|\n|\r/", $content);
5757

58-
$fontSize = 5; //5px
58+
$fontSize = ($maxX) ? (int) ((5 / 36) * $maxX) : 5; //5px
5959
$lineSize = ceil($fontSize * 1.25);
6060

6161
$image = imagecreate($maxX, $maxY);

0 commit comments

Comments
 (0)