Font size not right when converting from RTF to Web

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ok, now i had a similar question involving changing colors from GDI to web,
and i couldnt find a font translator class so here i am. I am trying to
change rtf to html (w/o 3rd party extensions, since i only need to convert
text) and when i attemp to get the font size from a rich text box and show it
in a WebBrowser control, the size is way too big. how can i get the font size
rite? if tried

Me.rtbText.Font.Size

and

Me.rtbText.Font.SizeInPoints

and neither work....any help would be great
 
ok, now i had a similar question involving changing colors from GDI to web,
and i couldnt find a font translator class so here i am. I am trying to
change rtf to html (w/o 3rd party extensions, since i only need to convert
text) and when i attemp to get the font size from a rich text box and show it
in a WebBrowser control, the size is way too big. how can i get the font size
rite? if tried

Me.rtbText.Font.Size

and

Me.rtbText.Font.SizeInPoints

and neither work....any help would be great

I have no idea exactly what you are doing here, but if you have an RTF
document using a Font named Tahoma, size 8pt, the proper way to
duplicate that in HTML is by using "Style" tags. Note the difference
in the browser between 8 point and 8 pixel:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
..style1 {
font-size: 8pt;
font-family: Tahoma;
}
..style2 {
font-family: Tahoma;
font-size: 8px;
}
-->
</style>
</head>

<body>This is default, <span class="style1">This is Tahoma, 8pt,
</span>
<span class="style2">This is Tahoma, 8px</span>
</body>
</html>


Gene
 
well what im trying to do is make an AIM Custom Client using the released
SDK. The AIM network uses an html like formatting. since there isnt a control
that will format text into html, i have to get the font style information
manually. i dont think the css styling will work since i need each line of
text to be a different font style and change it on the fly....is there any
other way?
 
Back
Top