Example #1
0
        public FontSetting(System.Drawing.Color color, string familyName, float size, System.Drawing.FontStyle style)
        {
            Foreground = BrushFactory.Create(Color.FromArgb(color.A, color.R, color.G, color.B));
            Family     = new FontFamily(familyName);
            Size       = size;
            Style      = (style & System.Drawing.FontStyle.Italic) == System.Drawing.FontStyle.Italic ? System.Windows.FontStyles.Italic : System.Windows.FontStyles.Normal;
            Weight     = (style & System.Drawing.FontStyle.Bold) == System.Drawing.FontStyle.Bold ? System.Windows.FontWeights.Bold : System.Windows.FontWeights.Normal;

            Font = new System.Drawing.Font(familyName, size, style);
        }