OpenOffice-OODoc - Re: probably a bug : replaceElement looses original font

Posted on Thu Jun 5 17:03:42 2008 by jmgdoc in response to 7916 (See the whole thread of 2)
Re: probably a bug : replaceElement looses original font

When a font name is set (generally through a 'style:font-name' text property) in a new style, take care of the availability of the corresponding font declaration in the document. A font is not rendered if it's not declared (see importFontDeclaration()).

Importing a style doesn't automatically imports the related fonts. If the imported style has a 'style:font-name' property, or inherits such a property from its parent style, the corresponding font must be explicitly imported in the target document.

More details about related methods, i.e. getFontDeclaration() and importFontDeclaration(), in the OpenOffice::OODoc::Styles manual.
Write a response