function GenericBox() { $this->_left = 0; $this->_top = 0; $this->baseline = 0; $this->default_baseline = 0; // Generic CSS properties // Save CSS property values $base_font_size = get_base_font_size(); // 'color' $handler = get_css_handler('color'); $this->color = $handler->get(); // 'font-size' $this->font_size = units2pt(get_font_size(), $base_font_size); // 'font-family' $this->family = get_font_family(); // 'font-weight' $this->weight = get_font_weight(); // 'font-style' $this->style = get_font_style(); // 'text-decoration' $handler = get_css_handler('text-decoration'); $this->decoration = $handler->get(); }
function push_css_text_defaults() { // No borders for pure text boxes; border can be controlled via SPANs push_border(default_border()); push_font_family(get_font_family()); // push_font_size(get_font_size()); push_font_size("1em"); push_font_style(get_font_style()); push_font_weight(get_font_weight()); push_line_height(get_line_height()); global $g_css_handlers; $keys = array_keys($g_css_handlers); foreach ($keys as $key) { $g_css_handlers[$key]->inherit_text(); } }
function ps_set_font($encoding) { global $g_font_resolver; $data = get_font_size() . " " . $g_font_resolver->ps_font_family(get_font_family(), get_font_weight(), get_font_style(), $encoding); return $data; }