FontInfo and Styles

G

Guest

Hello All--

Another "seems like there should be a way to..." question.

Is there any way to apply the information in a FontInfo object to a style
for rendering, other than brute force. Right now, I have calls like:

private void WriteFontInfoStyle(FontInfo fi, HtmlTextWriter writer)
{
// For example...
if (fi.Bold)
writer.AddStyleAttribute(HtmlTextWriterStyle.FontWeight, "bold");

if (fi.Italic)
writer.AddStyleAttribute(HtmlTextWriterStyle.FontStyle, "italic");
// etc....
}

If anybody has a custom control example that sets multiple Font/FontInfo
properties, I'd love to see an example.

Thanks In Advance,
PAGates
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top