示例#1
0
            public ResourceBuilder <T> AddSimpeType1Font(string baseFont, out FontIdentifier identifier)
            {
                string name = "F" + _parent.Compositor.FontID.ToString();

                identifier = new FontIdentifier {
                    Name = name
                };

                IndirectObject reference = _parent.Compositor.IndirectObject(
                    _parent.Compositor.Dictionary("Font")
                    .Set("Subtype", new NameObject("Type1"))
                    .Set("BaseFont", new NameObject(baseFont))
                    );

                if (_fonts == null)
                {
                    _fonts = new DictionaryObject();
                    _me.Set("Font", _fonts);
                }

                _fonts.Set(name, reference);
                _parent.Compositor.FontID += 1;

                return(this);
            }
示例#2
0
 public PageBuilder SetFont(FontIdentifier name, float size)
 {
     _stream.List.Add(new SetFontCommand(
                          new NameObject(name.Name),
                          new RealNumberObject(size)
                          ));
     return(this);
 }