function print_text($txt, $font) { global $FONT_STYLES; $txt = str_replace("<", "<", $txt); $txt = str_replace(">", ">", $txt); $txt = str_replace("&", "&", $txt); $txt = str_replace('"', """, $txt); $txt = str_replace("'", "'", $txt); $txt = str_replace("\n", '<text:line-break/>', $txt); $txt = str_replace("\t", '<text:tab-stop/>', $txt); if (!is_array($FONT_STYLES[$font[name]])) { add_font($font); } return TAB . '<text:p text:style-name="' . $font['name'] . '">' . $txt . '</text:p>' . NL; }
function print_text_asis($txt, $font) { global $FONT_STYLES; if (!is_array($FONT_STYLES[$font[name]])) { add_font($font); } return TAB . $txt . NL; }