473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Font size not right when converting from RTF to Web

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
2 1504
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
9
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.