Forum Bugs

iFrame overwrites CSS-embedded font

Well, this is some special case...

We use a document which includes an iFrame. Both document and iFrame have a fonts embedded.

Sadly the font definitions have the same name, but they are not the same fonts.
I can't change this naming because the content is generated by a render engine.

The browsers I run testes with have the expected behaviour. I.e. for the iFrame they use the embedded font from iFrame CSS, and for the main document the fonts from there...

It looks to me like Prince has no isolated name space for iFrame CSS fonts.

That is true, there is only one font namespace at the moment. To be honest, I don't think many people have been using iframes with Prince up until now. :)
So there is no hope that this gets fixed, although Prince's behaviour here is different than a browser's?

There is hope! But it will take time. Currently Prince does not support @font-face rules in external SVG files, and this is a similar issue. The font system was not designed to cope with scoped font definitions.
Good to hear, thank you!

At the moment we use same regexp replacement pre-processing... works :)