Numbered lists, wrong font after load / save
Posted: Mon Nov 20, 2023 9:12 am
Hello,
in some of our MSWord created files (docx, rtf) there is a custom Textstyle "Standard-Arial" applied to all texts the default "Standard" ist kept with word defaults. (this happens also if you assign in word just any font or size without useing a template)
If we load such a document with TRichView or ScaleRichView and save these documents as RTF or DOCX - the Format / Style of the numbers is reset to "Standard" instead of "Standard-Arial".
In the original Word document the StyleTemplates for these numbered lists don't have a fontname and so on, but after load / save with TRichView they get assigned the first style / font of the document.
In Word these NumberLists use / inherit the format of the paragraph just in time of rendering.
I think the logic durring loading these styles from docx / rtf is wrong, that they substitute the not assigned font with the document default / first font?
The list uses the "Standard-Arial" Formattemplate - with Arial 12 as its default. So the numbers are Arial 12 and Text after. After load save the numbers are rendered with "Calibri" ("Standard") - because the template of the list was changed from no font - to first font / format. André
in some of our MSWord created files (docx, rtf) there is a custom Textstyle "Standard-Arial" applied to all texts the default "Standard" ist kept with word defaults. (this happens also if you assign in word just any font or size without useing a template)
If we load such a document with TRichView or ScaleRichView and save these documents as RTF or DOCX - the Format / Style of the numbers is reset to "Standard" instead of "Standard-Arial".
In the original Word document the StyleTemplates for these numbered lists don't have a fontname and so on, but after load / save with TRichView they get assigned the first style / font of the document.
In Word these NumberLists use / inherit the format of the paragraph just in time of rendering.
I think the logic durring loading these styles from docx / rtf is wrong, that they substitute the not assigned font with the document default / first font?
The list uses the "Standard-Arial" Formattemplate - with Arial 12 as its default. So the numbers are Arial 12 and Text after. After load save the numbers are rendered with "Calibri" ("Standard") - because the template of the list was changed from no font - to first font / format. André