public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
            {
                if (destinationType == null)
                {
                    throw new ArgumentNullException("destinationType");
                }

                if ((destinationType == typeof(string)) && (value is ReportFont))
                {
                    ReportFont font = (ReportFont)value;
                    if (font.IsEmpty)
                    {
                        return(string.Empty);
                    }

                    if (culture == null)
                    {
                        culture = CultureInfo.CurrentCulture;
                    }

                    string[] fontText = new string[4];
                    int      index    = 0;

                    fontText[index++] = font.FontStyle.ToString();
                    fontText[index++] = font.FontFamily;
                    fontText[index++] = font.FontSize.ToString();
                    fontText[index++] = font.FontWeight.Text;

                    return(string.Join(DELIMITER.ToString() + " ", fontText));
                }

                if ((destinationType == typeof(InstanceDescriptor)) && (value is ReportFont))
                {
                    ReportFont      font      = (ReportFont)value;
                    Type[]          typeArray = new Type[] { typeof(FontStyle), typeof(string), typeof(Unit), typeof(string) };
                    ConstructorInfo ctorInfo  = typeof(ReportFont).GetConstructor(typeArray);
                    if (ctorInfo != null)
                    {
                        object[] objArray = new object[] { font.FontStyle, font.FontFamily, font.FontSize, font.FontWeight };
                        return(new InstanceDescriptor(ctorInfo, objArray));
                    }
                }
                return(base.ConvertTo(context, culture, value, destinationType));
            }
 public static Font ToFont(ReportFont reportFont)
 {
     return(new Font(reportFont.FontFamily, (float)reportFont.FontSize.Value, (reportFont.FontStyle == FontStyleType.Italic ? System.Drawing.FontStyle.Italic : System.Drawing.FontStyle.Regular), GraphicsUnit.Point));
 }