Browse Source
Reduce text size of text file preview, fix #13720
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
pull/13764/head
Jan-Christoph Borchardt
7 years ago
committed by
Roeland Jago Douma
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with
3 additions and
2 deletions
-
lib/private/Preview/TXT.php
|
|
|
@ -60,8 +60,9 @@ class TXT extends Provider { |
|
|
|
|
|
|
|
$lines = preg_split("/\r\n|\n|\r/", $content); |
|
|
|
|
|
|
|
$fontSize = $maxX ? (int) ((5 / 32) * $maxX) : 5; //5px
|
|
|
|
$lineSize = ceil($fontSize * 1.25); |
|
|
|
// Define text size of text file preview
|
|
|
|
$fontSize = $maxX ? (int) ((2 / 32) * $maxX) : 5; //5px
|
|
|
|
$lineSize = ceil($fontSize * 1.5); |
|
|
|
|
|
|
|
$image = imagecreate($maxX, $maxY); |
|
|
|
imagecolorallocate($image, 255, 255, 255); |
|
|
|
|