summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-04-15 14:03:40 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-04-15 14:03:40 +0200
commit1592f25ed05faccb860637f230978df3336d51e1 (patch)
tree10ec34fa9909911c2dc142311340f0d3e6bec9a0
parent1a894bd0d8ab034f35dbb3b723dd195e7f66aab4 (diff)
downloadnextcloud-server-1592f25ed05faccb860637f230978df3336d51e1.tar.gz
nextcloud-server-1592f25ed05faccb860637f230978df3336d51e1.zip
Scale up the font on larger previews
-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);