summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2019-01-23 13:29:51 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-01-23 15:37:08 +0100
commit9147a12ee14318b94fa2971466c553632cd34d63 (patch)
tree969dc715955954c96c51e96b9df6bb663a52fbb3 /lib/private/Preview
parent68c0fd3863e728f908cb33c84c770d1ea6709f94 (diff)
downloadnextcloud-server-9147a12ee14318b94fa2971466c553632cd34d63.tar.gz
nextcloud-server-9147a12ee14318b94fa2971466c553632cd34d63.zip
Reduce text size of text file preview, fix #13720
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r--lib/private/Preview/TXT.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php
index a5efb73010c..2bb121775d6 100644
--- a/lib/private/Preview/TXT.php
+++ b/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);