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é
Numbered lists, wrong font after load / save
Numbered lists, wrong font after load / save
- Attachments
-
- SimpleList_MSWord.docx
- (13.84 KiB) Downloaded 2424 times
-
- SimpleList_ScaleRichView.docx
- (6.68 KiB) Downloaded 2374 times
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Numbered lists, wrong font after load / save
I'll check what I can do to load these files as close to the original as possible.
But currently TRichView does not have an option for not defining font for a list marker.
But currently TRichView does not have an option for not defining font for a list marker.
Re: Numbered lists, wrong font after load / save
Hi,
my first idea was - to clone the list style and set the same font / size / color - as the following paragraph, but this seems a very complex tasks - because if the same list style is used with different fonts/size/color - I need extra clones and I need to find out where a new list starts so that every instance of a numbered list may get it's own style with the correct font / size / color at each level.
First I think we should preserve the info that the font or some properties are not defined in the loaded document and were substituted with some "default" to ignore these list styles / levels durring clone if f.e. the font was assigned in the loaded document.
André
my first idea was - to clone the list style and set the same font / size / color - as the following paragraph, but this seems a very complex tasks - because if the same list style is used with different fonts/size/color - I need extra clones and I need to find out where a new list starts so that every instance of a numbered list may get it's own style with the correct font / size / color at each level.
First I think we should preserve the info that the font or some properties are not defined in the loaded document and were substituted with some "default" to ignore these list styles / levels durring clone if f.e. the font was assigned in the loaded document.
André
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Numbered lists, wrong font after load / save
Normally, when reading RTF, TRichView creates lists basing on RTF's table of lists. Then it adjusts list property according to the first occurrence of a list marker. As far as I remember, such an adjustment includes modifying indents. I'll see, maybe I can do the same with fonts.
Re: Numbered lists, wrong font after load / save
Hello Sergey,
Have you also worked on this point in the current version?
Have you also worked on this point in the current version?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Numbered lists, wrong font after load / save
Actually, TRichView already does adjustment of some font properties for the first list marker. But it does not do it for a font name.
It's more complicated, because fonts name of bullets should not be adjusted. I need more time. Not in the next update, sorry.
It's more complicated, because fonts name of bullets should not be adjusted. I need more time. Not in the next update, sorry.