Copy/pasted Headings from HTML changes their corresponding style complex font to Dejavu Sans

open the attached html file (h.zip) in the browser; copy and paste the content to a new blank Writer document. The Complex Font of Headings 1, 2, 3, 4 styles change to DejaVu Sans. I have already changed their complex fonts to IRNazanin and stored them in a default template. I expect them to remain unchanged!


h.zip (572 Bytes)

If you see Dejavu Sans in Headings 1-4, it is because the paragraph styles Heading 1-4 are set up accordingly.
Just because you insert text will not change the settings in the paragraph styles.

If you need different fonts in paragraph styles 1-4, you should create a document template in which the paragraph styles are set up according to your preferences.


Of course, the desired fonts should be available on your operating system.

1 Like

I have already change their complex fonts to IRNazanin and stored them in a default template. I updated the question accordingly.

The colors shown in the screenshot for the text headings are colored and striped.
This indicates that, in addition to the formatting corresponding to the paragraphs, there is also direct formatting or character formatting.

Yes, but if I clear direct formatting and any Character formatting (Styles > No Character Style), the problem remains intact and the complex font is still DejaVu Sans

Because the document has not yet used the built-in styles, the formatting attached to the html is imported and modifies the existing styles.

right, if I use Headings styles at least once, copy/pasting won’t change complex font. Why it does not affect the Western font regardless of its usage in the document? If I change western font of Heading 2 from “Liberation Serif” to “Linux Biolinum O” without using it in the document, pasting from HTML won’t reset it to “Liberation Serif”. The LO behaviour is not consistent between western and complex fonts.
thanks

I reported as bug: 170183 – Copy/pasted Headings from HTML changes their corresponding style complex font to Dejavu Sans

As a workaround, in a new blank document, I applied H1-H4 to some text and removed them all. Then saved the document as a new template.