Example #1
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                string invariantDescriptionString = info.GetNodeContent();

                if (invariantDescriptionString.IndexOf(worldPostfix) < 0)
                {
                    // Exception: some strings prior to 2012-11-01 were serialized with a unit of pt. We must convert them to world units here.
                    using (var gdiFont = (System.Drawing.Font)_fontConverter.ConvertFromInvariantString(invariantDescriptionString))
                    {
                        return(new FontX(gdiFont.FontFamily.Name, gdiFont.SizeInPoints, (FontXStyle)gdiFont.Style));
                    }
                }
                else
                {
                    return(new FontX(invariantDescriptionString));
                }
            }
        public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
        {
            string val = info.GetNodeContent();

            return((Font)sm_Converter.ConvertFromInvariantString(val));
        }