Ejemplo n.º 1
0
        /// <inheritdoc />
        protected override void SetFont(Interop.LogFont font)
        {
            if (font == null)
            {
                throw new ArgumentNullException("font");
            }

            Control.FontFamily = new FontFamily(font.FaceName);
            Control.FontSize   = font.Height;
            Control.FontWeight = font.Weight > 0 && font.Weight < 1000 ?
                                 System.Windows.FontWeight.FromOpenTypeWeight(font.Weight) :
                                 System.Windows.FontWeights.Normal;
        }
 /// <inheritdoc/>
 protected override void SetFont(Interop.LogFont font) => Control.Font = Font.FromLogFont(font);
Ejemplo n.º 3
0
 /// <summary>Called to set the font of the preview control according to the user's preferences.</summary>
 /// <param name="font"></param>
 protected abstract void SetFont(Interop.LogFont font);