Ugh.. it's a bit complicated.
First, create an appropriate paragraph style with an arbitrary name:
$doc->createStyle(
"ComicMS11",
family => 'paragraph',
parent => "Standard",
properties => {
-area => 'text',
'style:font-name' => 'Comic Sans MS',
'fo:font-size' => '11pt'
}
);
Then declare the font. The smartest way consists of importing
the font from another document where it's already in use:
$doc2 = odfDocument(file => "foo.odt", part => 'content');
$doc->importFontDeclaration($doc2, "Comic Sans MS");
Otherwise, a brute force XML font declaration must be done.
You can follow the example at
OpenOffice::OODoc::Styles::importFontDeclaration
When all this stuff is ready, you can append a paragraph using the new style to the frame:
$doc->appendParagraph(
text => "TEST INSERT TEKST",
style => "ComicMS11"
);