Exemplo n.º 1
0
function print_text($txt, $font)
{
    global $FONT_STYLES;
    $txt = str_replace("<", "&lt;", $txt);
    $txt = str_replace(">", "&gt;", $txt);
    $txt = str_replace("&", "&amp;", $txt);
    $txt = str_replace('"', "&quot;", $txt);
    $txt = str_replace("'", "&apos;", $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;
}
Exemplo n.º 2
0
function print_text_asis($txt, $font)
{
    global $FONT_STYLES;
    if (!is_array($FONT_STYLES[$font[name]])) {
        add_font($font);
    }
    return TAB . $txt . NL;
}