From 1e3b2740e522a8fde6bfef1030cd9b4a5eae0304 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Wed, 24 Dec 2014 20:00:17 +0100 Subject: improve tag cloud font size scaling * use logarithmic scales * remove bold style --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 02a6725f..7843f2b8 100644 --- a/index.php +++ b/index.php @@ -1251,8 +1251,9 @@ function renderPage() ksort($tags); $tagList=array(); foreach($tags as $key=>$value) + // Tag font size scaling: default 15 and 30 logarithm bases affect scaling, 22 and 6 are arbitrary font sizes for max and min sizes. { - $tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8)); + $tagList[$key] = array('count'=>$value,'size'=>log($value, 15) / log($maxcount, 30) * (22-6) + 6); } $PAGE = new pageBuilder; $PAGE->assign('linkcount',count($LINKSDB)); -- cgit v1.2.3