/** * Retrieve a font size for a tag * * @param Varien_Object $tag * @return int */ public function getFontSize(Varien_Object $tag) { if ($this->getMaximumPopularity() > 0) { $percentage = $tag->getCount() * 100 / $this->getMaximumPopularity(); foreach ($this->getFontSizes() as $percentageLimit => $default) { if ($percentage <= $percentageLimit) { return $default; } } } return 150; }