Page 1 of 1
HTML font size
Posted: Thu Jul 05, 2007 7:41 am
by cychia
<div><font size="3">qweqweq</font>weqeq q weq weqw eqw</div>
this is the html source exported from rv. How can I export the html with the font size in size="11pt" rather than size="3" ?
Posted: Thu Jul 05, 2007 9:27 am
by Sergey Tkachenko
Use SaveHTMLEx instead of SaveHTML.
SaveHTML does not use CSS, and without CSS it's impossible to define font size in points.
Posted: Mon Jul 09, 2007 1:37 pm
by cychia
<html><head><title>fontsize.htm</title>
</head>
<body bgcolor="#ffffff" leftmargin=5 topmargin=5 rightmargin=5 bottommargin=5>
<font size=2 color="#000000" face="Arial">
<div><font size=1><br></font></div>
<div><font size=1>8</font></div>
<div><font size=2>9</font></div>
<div>10</div>
<div><font size=3>11</font></div>
<div><font size=3>12</font></div>
<div><font size=4>13</font></div>
<div><font size=4>14</font></div>
<div><font size=5>15</font></div>
<div><font size=5>16</font></div>
<div><font size=5>17</font></div>
<div><font size=5>18</font></div>
<div><font size=6>19</font></div>
<div><font size=6>20</font></div>
<div><font size=6>21</font></div>
<div><font size=6>22</font></div>
<div><font size=6>23</font></div>
<div><font size=6>24</font></div>
<div><font size=7>25</font></div>
<div><font size=7>26</font></div>
<div><font size=7>27</font></div>
<div><font size=7>28</font></div>
</font>
</body></html>
this is the html generate by rv. I have found out that start from size 25 in RV the font size after exported to rv will be 7.
It is a bit different from MS Frontpage, which is as below:
8pt - size 1
10pt - size 2
12pt - size 3
14pt - size 4
18pt - size 5
24pt - size 6
36pt - size 7
Posted: Mon Jul 09, 2007 3:07 pm
by Sergey Tkachenko
There are no strict rules how size in points must be translated in HTML font size.
I do not want to change this method in TRichView due to possible compatibility problems.
If you want, you can change it in your copy of TRichView.
RVFuns.pas, function RV_HTMLGetFontSize(pts: Integer): Integer;
Posted: Sun Jul 22, 2007 10:49 pm
by UweM
Using the outdated <font></font> tag within a <div></div> doesn't make sense at all. Why don't you define the font size for the <div> in your CSS file?
Uwe
Posted: Tue Jul 24, 2007 2:46 pm
by Sergey Tkachenko
SaveHTML does not use CSS, only SaveHTMLEx does.
And it uses <span> instead of <div>/<p> for defining font attibutes, because in TRichView paragraphs do not have font attributes.
SaveHTML uses outdated tags because it is designed to generate HTML for outdated or simple browsers. For generating modern HTML, SaveHTMLEx must be used instead.