By default the Font is not XML Serializable since it doesn't have a default (empty) constructor. You can create your own class holding the properties of the font that you need, and serialize that class..
fex:
public class SerializableFont
{
public string FontFamily { get; set; }
public GraphicsUnit GraphicsUnit { get; set; }
public float Size { get; set; }
public FontStyle Style { get; set; }
/// <summary>
/// Intended for xml serialization purposes only
/// </summary>
private SerializableFont() { }
public SerializableFont(Font f)
{
FontFamily = f.FontFamily.Name;
GraphicsUnit = f.Unit;
Size = f.Size;
Style = f.Style;
}
public static SerializableFont FromFont(Font f)
{
return new SerializableFont(f);
}
public Font ToFont()
{
return new Font(FontFamily, Size, Style,
GraphicsUnit);
}
}
source:
http://stackoverflow.com/questions/1940127/how-to-xmlserialize-system-drawing-font-class[
^]
Another way is to Base64 encode the font and decode it back when you need it..