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 css_line_height($value, $root) { pop_line_height(); // <Number> // The used value of the property is this number multiplied by the element's font size. // Negative values are illegal. The computed value is the same as the specified value. if (preg_match("/^\\d+(\\.\\d+)?\$/", $value)) { push_line_height(new LineHeight_Relative((double) $value)); return; } // <percentage> // The computed value of the property is this percentage multiplied by the element's // computed font size. Negative values are illegal. if (preg_match("/^\\d+%\$/", $value)) { push_line_height(new LineHeight_Relative((double) $value / 100)); return; } // normal // Tells user agents to set the used value to a "reasonable" value based on the font of the element. // The value has the same meaning as <number>. We recommend a used value for 'normal' between 1.0 to 1.2. // The computed value is 'normal'. if (trim($value) === "normal") { push_line_height(default_line_height()); return; } // <length> // The specified length is used in the calculation of the line box height. // Negative values are illegal. push_line_height(new LineHeight_Absolute($value)); }