By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,403 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,403 IT Pros & Developers. It's quick & easy.

Font size not right when converting from RTF to Web

P: n/a
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
--
-iwdu15
Jul 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sat, 1 Jul 2006 17:31:01 -0700, iwdu15 <jmmgoalsteratyahoodotcom>
wrote:
>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
Jul 2 '06 #2

P: n/a
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?
--
-iwdu15
Jul 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.