fdo#34814 - Importing doc with fonts unavailable on the system
Lubos Lunak
l.lunak at suse.cz
Fri May 4 08:53:37 PDT 2012
On Friday 04 of May 2012, Caolán McNamara wrote:
> On Fri, 2012-05-04 at 16:11 +0200, Lubos Lunak wrote:
> > Hello,
> >
> > I've been looking at fdo#34814 and I know what the problem is, but I'm
> > not sure how that should be fixed.
> >
> > The problem is that the document imported uses Wingdings (2) as the
> > fonts for bullet points, but that's a Windows font that is not available
> > on Linux.
>
> See unotools/source/misc/fontcvt.cxx for some possibly relevant goodies.
>
> IIRC what's supposed to happen (though maybe this never worked right,
> but there's enough of the right code there to try and make it work) is
> that if a symbol font is missing, and its one of the ones known to
> ConvertChar::GetRecodeData then vcl should map the glyphs to ones found
> in OpenSymbol
>
> Maybe this got broken, or there's some small-ish reason why stuff isn't
> getting run through that converter ?
This is the reason:
rAttrs.mbSymbolFlag= (mpImplFont->meCharSet == RTL_TEXTENCODING_SYMBOL)
LO needs to know that Wingdings has charset SYMBOL. With my workaround, this
gets called, without it, the code thinks the charset is something else
(US_ASCII IIRC) and the conversion is not done.
IOW that code works right, but that's not where the problem is. Writer core
somehow needs to know what the bullet font is it getting via UNO actually is,
but since it itself does not know that font because it's not installed, and
the import filter does not(?) have a way to tell it, it does not work.
So I guess the proper fix would be something overengineered like creating
another interface in offapi/ for transfering a list of font->charset
mappings, somehow associating it with SwXNumberingRules and transfering the
font data first before doing anything with the numbering itself. Is there
some doc somewhere describing what the official way of doing this is?
--
Lubos Lunak
l.lunak at suse.cz
More information about the LibreOffice
mailing list