示例#1
0
        public Size2 MeasureString(string text, Font2 font)
        {
            SetFont(font);
            Chunk chunk = new Chunk(text, PdfGraphicUtils.GetFont(font));

            return(new Size2(chunk.GetWidthPoint() * 1.5f, font.Height * 0.5f * 1.5f));
        }
示例#2
0
        private void SetFont(Font2 font)
        {
            Font f = PdfGraphicUtils.GetFont(font);

            template.SetFontAndSize(f.BaseFont, font.Size);
        }