コード例 #1
0
        public BrowserFont(string fontName, float size, BrowserFontType fontType)
        {
            FontName = fontName;
            FontType = fontType;

            if (fontType == BrowserFontType.Normal)
            {
                _style = FontStyle.Regular;
                _color = Color.Black;
            }
            if (FontType == BrowserFontType.UnvisitedLink)
            {
                _style = FontStyle.Bold | FontStyle.Underline;
                _color = Color.Blue;
            }
            _rawFont = new Font(fontName, size, _style);
            _brush = new SolidBrush(_color);
            FontType = fontType;
            Height = _rawFont.GetHeight();
        }
コード例 #2
0
 public BrowserFont GetBrowserFont(BrowserFontType type)
 {
     return _fonts.First(x => x.FontType == type);
 }