I have a WPRichText where f0 (default font) is set to Arial and f1 is set to Times New Roman. I know about the -nodefaultfont option, but please read thru.. I hope I explain this clearly.
I Issue two LoadFromStrings, the first has a default font of Times New Roman and the 2nd has a default font of Arial:
Loaded via: pWP.LoadFromString(vWP.AsANSIString('WPTOOLS'), 'WPTOOLS');
Keep in mind that all the text is marked to be Times New Roman, so it might be f0 or f1 depending on the font table.
The first LoadFromString results in the new text (f0 in its font table is Times New Roman) as showing in Times New Roman and the font table now has the default font as Times New Roman instead of Arial.
When I load the 2nd one which has a default font of Arial and f1 as Times New Roman, the font table is switched back to a default font of Arial and as such the first loaded text switches to Arial.
Not good since everything should be in Times New Roman. So I add the option -nodefaultfont for the LoadFromString:
pWP.LoadFromString(vWP.AsANSIString('WPTOOLS'), 'WPTOOLS,-nodefaultfont');
The first LoadFromString is wrong right away. It shows as Arial because the font table has f0 as Arial (the string being loaded has the default as Times New Roman, but that option doesn't change the font table).
Is there an option that will not touch the host WPRichText's font table (but add to it if needed) and remap the fonts from the one being loaded? In other words, I need an option that will see that the WPRichText being loaded has a default font of Times New Roman and will only add to and/or remap the text to the existing font table so that it stays Times New Roman? i.e. if the host has Times New Roman as f1, then f0 in the loaded WPRichText gets reassigned as f1?
One more thing to note. The Loaded text does not have an actual font assigned to the text whereas the original text does, so it gets remapped to the new font table and the loaded text does not.
I hope that was clear.