When reading rtf -> writing html -> loading html the font switches.
WpTools seems to behave very strange at least when using styles. Or maybe i have done some setting that confuses the reader and writer classes.
My RTF document has the following header.
{\rtf1\ansi\deff0\uc1\ansicpg1252\deftab254{\fonttbl{\f0\fnil\fcharset1 Verdana;}{\f1\fnil\fcharset1 Verdana;}{\f2\fnil\fcharset1 Times New Roman;}{\f3\fnil\fcharset2 Wingdings;}{\f4\fnil\fcharset2 Symbol;}{\f5\fnil\fcharset2 Webdings;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red128\green128\blue0;}\wpprheadfoot0\paperw11906\paperh16838\margl1882\margr1882\margt1440\margb1440\headery254\footery254\endnhere\sectdefaultcl{\*\generator WPTools_6.060;}{\info{\*\operator hvli}
And the following stylesheet
{\stylesheet{\s1\li0\fi0\ri0\sb0\sa0\ql\vertalt\f0\fs20 Normal;}{\s2\li0\fi0\ri0\sb0\sa0\ql\vertalt\f1\fs20 Normal;}{\s3\li0\fi0\ri0\sb0\sa0\ql\vertalt\fs20 Default Paragraph Font;}{\s4\li0\fi0\ri0\sb0\sa0\ql\vertalt\f5\fs22\snext3 @font-face;}
The first 2 paragraphs in the document are empty:
{\pard\plain\s4\li0\fi0\ri0\sb0\sa0\ql\vertalt\f1\fs20\par\pard\plain\s4\li0\fi0\ri0\sb0\sa0\ql\vertalt\f1\fs20\cf15\par\plain\s4\li0\fi0\ri0\sb0\sa0\ql\vertalt\f1\fs20\cf15 Vriendelijke groet, \par
Reading this document all works well. The first paragraph have font name "Verdana" (f1) and font size 10 (fs20)
Now when i save it to html i get the following:
</style></head><body><div class="@font-face" style="text-indent:0.00in;text-align:left;vertical-align:top;margin:0.00in;"> </div><div class="@font-face" style="text-indent:0.00in;margin-left:0.00in;margin-right:0.00in;"> </div><div class="@font-face" style="text-indent:0.00in;margin-left:0.00in;margin-right:0.00in;"><font face="Verdana" size=2 color="black">Vriendelijke groet, </font></div>
Now it lists the first 2 paragraphs as having font name = 'Webdings' and font size is 11.
However if i type on the second empty paragraph it still shows up as Verdana 10. The first paragraph however shows up as Webdings 11.
So both on storing HTML as well as reading HTML it makes no sense to me.
Now if i change the html to the following:
<div class="@font-face" style="text-indent:0.00in;text-align:left;vertical-align:top;margin:0.00in;"> <font face="Verdana" size=3></font></div>
<div class="@font-face" style="text-indent:0.00in;margin-left:0.00in;margin-right:0.00in;"> <font face="Verdana" size=3></font></div>
My first paragraph is still font size 11 (probably because of the stylesheet)
But my second empty paragraph is font size 12.
In my opinion the correct order for choosing the font should be:
- font setting from the paragraph
- stylesheet setting from the paragraph
- default font for the document
For some reason it seems empty paragraphs behave differently. As if they are looking at the next paragraph to tell them what the current font is.
Again when reading RTF, not a problem at all. Add HTML to the mix and you're in big trouble.
WPTools 6.13.1