HTML font size

General TRichView support forum. Please post your questions here
Post Reply
cychia
Posts: 104
Joined: Mon Jan 16, 2006 1:52 am

HTML font size

Post 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" ?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
cychia
Posts: 104
Joined: Mon Jan 16, 2006 1:52 am

Post 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
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
UweM
Posts: 18
Joined: Wed Oct 04, 2006 5:30 pm
Location: USA

Post 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
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply