public override void Arrange()
 {
     _objectNumber = 127;
     _fontName = "/F1";
     _baseFontname = "Courier";
     _fontProperties = new FontProperties { Name = _baseFontname, Size = 10 };
 }
 public override void Arrange()
 {
     _objectNumber = 248;
     _fontName = "/F0";
     _baseFontname = "Helvetica";
     _fontProperties = new FontProperties { Name = _baseFontname, Size = 10 };
 }
Esempio n. 3
0
        public override void Arrange()
        {
            _document = new Document();
            _sut = _document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));

            _fontsize = 10;
            _properties = new FontProperties { Name = "Arial", Size = _fontsize };
        }
Esempio n. 4
0
        public override void Arrange()
        {
            _document = new Document();
            _textbox = _document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));

            _fontProperties = new FontProperties { Name = "Arial" };
            _textbox.SetFont(_fontProperties);

            _sut = new ContentsObject(246);
        }
Esempio n. 5
0
        public void SetFont(FontProperties properties, bool onlyStyleChanged = false)
        {
            var fontName = properties.Name;
            if (properties.Name == "Helvetica" || properties.Name == "Courier")
            {
                if (_fontStyles.Count > 0)
                    fontName += "-";
                if (_fontStyles.Contains(FontStyle.Bold))
                    fontName += "Bold";
                if (_fontStyles.Contains(FontStyle.Italic))
                    fontName += "Oblique";
            }

            if (!onlyStyleChanged)
                _currentFont = properties;

            var font = _owner.AddFont(fontName);
            _textCommands.Add(new TextCommand(Command.SetFont, new FontDefinition(font, properties.Size)));

            var fontReference = string.Format("{0} {1} 0 R ", font.FontName, font.Number);
            if (!_fontReferences.Contains(fontReference))
                _fontReferences.Add(fontReference);
        }