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
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