Ejemplo n.º 1
0
 private void CreateFont()
 {
     FontExtensions.Clean(_font);
     _font       = new Font(FontName, FontSize, FontStyle.Regular);
     _charWidth  = _font.Width();
     _charHeight = _font.Height();
 }
Ejemplo n.º 2
0
 private void CreateSmallFont()
 {
     FontExtensions.Clean(_smallFont);
     _smallFont       = new Font(FontName, FontSize - 1, FontStyle.Regular);
     _smallCharWidth  = _smallFont.Width();
     _smallCharHeight = _smallFont.Height();
 }
Ejemplo n.º 3
0
        private void ResetFontInfo()
        {
            _charWidth       = null;
            _charHeight      = null;
            _smallCharHeight = null;
            _smallCharWidth  = null;

            if (_font != null)
            {
                FontExtensions.Clean(_font);
                _font.Dispose();
                _font = null;
            }

            if (_smallFont != null)
            {
                FontExtensions.Clean(_smallFont);
                _smallFont.Dispose();
                _smallFont = null;
            }
        }