function get_base_font_size()
{
    global $g_font_size;
    for ($i = 0; $i < count($g_font_size); $i++) {
        $unit = value::unit_from_string($g_font_size[$i]);
        if ($unit != UNIT_EX && $unit != UNIT_EM) {
            $font_size = units2pt($g_font_size[$i]);
            for ($j = $i - 1; $j >= 0; $j--) {
                $font_size = units2pt($g_font_size[$j], $font_size);
            }
            return $font_size;
        }
    }
    return 0;
}
Exemple #2
0
 public static function append($name, $type, $val)
 {
     global $_STATUS;
     if (array_key_exists($type, $_STATUS)) {
         $typeArray = $_STATUS[$type];
         if (array_key_exists(strtoupper($name), $_STATUS)) {
             $_STATUS[strtoupper($type)][strtoupper($name)] .= $val;
         } else {
             value::set($name, $type, $val);
         }
         // create new entry
     }
 }
 /**
  * Get a parsed value
  * @param  string $key
  * @param  value $value
  * @return string
  */
 protected function getParsedValue($key, $value)
 {
     switch ($key) {
         case self::COLUMN_ID:
             $id = $value->getId();
             if ($this->useColors) {
                 $id = $this->color($id, $this->levelColors[$value->getLevel()]);
             }
             return $id;
         case self::COLUMN_DATE:
             $date = $value->getDate();
             if ($this->dateDecorator) {
                 $date = $this->dateDecorator->decorate($date);
             }
             return $date;
         case self::COLUMN_MEMORY:
             $memory = memory_get_usage();
             if ($this->memoryDecorator) {
                 $memory = $this->memoryDecorator->decorate($memory);
             }
             return $memory;
         case self::COLUMN_DURATION:
             return substr($value->getMicroTime(), 0, 5);
         case self::COLUMN_CLIENT:
             return $value->getClient();
         case self::COLUMN_SOURCE:
             return $value->getSource();
         case self::COLUMN_LEVEL:
             $level = $this->levels[$value->getLevel()];
             if ($this->useColors) {
                 $level = $this->color($level, $this->levelColors[$value->getLevel()]);
             }
             return $level;
         case self::COLUMN_TITLE:
             $title = $value->getTitle();
             if ($this->useColors) {
                 $title = $this->color($title, $this->levelColors[$value->getLevel()]);
             }
             return $title;
         case self::COLUMN_DESCRIPTION:
             $description = $value->getDescription();
             if (!empty($description)) {
                 return $description;
             }
         default:
             return null;
     }
 }