summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-20 15:55:32 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-20 15:55:32 +0200
commit3e8f6cdba95690a12de4f8d6b99c59f7a823fbb0 (patch)
treea4e559805e86523b25ab6c32cf5617f50d131a4a /lib
parentce2c8533d9819e1ec9272bcdc06dcf4fa6b0678c (diff)
parent1592f25ed05faccb860637f230978df3336d51e1 (diff)
downloadnextcloud-server-3e8f6cdba95690a12de4f8d6b99c59f7a823fbb0.tar.gz
nextcloud-server-3e8f6cdba95690a12de4f8d6b99c59f7a823fbb0.zip
Merge pull request #15635 from owncloud/issue/15634-empty-txt-previews
Scale up the font on larger previews
Diffstat (limited to 'lib')
-rw-r--r--lib/private/preview/txt.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php
index 80fd0c7ebb4..ea817388f86 100644
--- a/lib/private/preview/txt.php
+++ b/lib/private/preview/txt.php
@@ -55,7 +55,7 @@ class TXT extends Provider {
$lines = preg_split("/\r\n|\n|\r/", $content);
- $fontSize = 5; //5px
+ $fontSize = ($maxX) ? (int) ((5 / 36) * $maxX) : 5; //5px
$lineSize = ceil($fontSize * 1.25);
$image = imagecreate($maxX, $maxY);