Esempio n. 1
0
        public FontSetup(FontInfo fontInfo, FontType proxyFontType) {
            this.fontInfo = fontInfo;

            // Add the base 14 fonts
            AddBase14Fonts();
            AddSystemFonts(proxyFontType);
        }
Esempio n. 2
0
 public FontState(FontInfo fontInfo, string fontFamily, string fontStyle,
                  string fontWeight, int fontSize, int fontVariant)
 {
     this.fontInfo = fontInfo;
     this.fontFamily = fontFamily;
     this.fontStyle = fontStyle;
     this.fontWeight = fontWeight;
     this.fontSize = fontSize;
     this.fontName = fontInfo.FontLookup(fontFamily, fontStyle, fontWeight);
     this.metric = fontInfo.GetMetricsFor(fontName);
     this.fontVariant = fontVariant;
     this.letterSpacing = 0;
 }
Esempio n. 3
0
 public FontState GetFontState(FontInfo fontInfo)
 {
     if (fontState == null)
     {
         string fontFamily = properties.GetProperty("font-family").GetString();
         string fontStyle = properties.GetProperty("font-style").GetString();
         string fontWeight = properties.GetProperty("font-weight").GetString();
         int fontSize = properties.GetProperty("font-size").GetLength().MValue();
         int fontVariant = properties.GetProperty("font-variant").GetEnum();
         fontState = new FontState(fontInfo, fontFamily, fontStyle,
                                   fontWeight, fontSize, fontVariant);
     }
     return fontState;
 }
Esempio n. 4
0
 public FontState(FontInfo fontInfo, string fontFamily, string fontStyle,
                  string fontWeight, int fontSize, int fontVariant, int letterSpacing)
     : this(fontInfo, fontFamily, fontStyle, fontWeight, fontSize, fontVariant)
 {
     this.letterSpacing = letterSpacing;
 }
Esempio n. 5
0
 /// <summary>
 /// </summary>
 /// <param name="fontInfo"></param>
 public void SetupFontInfo(FontInfo fontInfo) {
     this.fontInfo = fontInfo;
     this.fontSetup = new FontSetup(
         fontInfo, (options == null) ? FontType.Link : options.FontType);
 }
Esempio n. 6
0
        public void StopRenderer() {
            fontSetup.AddToResources(new PdfFontCreator(pdfDoc), pdfDoc.getResources());
            pdfDoc.outputTrailer();

            pdfDoc = null;
            pdfResources = null;
            currentStream = null;
            currentAnnotList = null;
            currentPage = null;

            idReferences = null;
            currentFontName = String.Empty;
            currentFill = null;
            prevUnderlineColor = null;
            prevOverlineColor = null;
            prevLineThroughColor = null;
            fontSetup = null;
            fontInfo = null;
        }
Esempio n. 7
0
 public FontState(FontInfo fontInfo, string fontFamily, string fontStyle,
                  string fontWeight, int fontSize, int fontVariant, int letterSpacing)
     : this(fontInfo, fontFamily, fontStyle, fontWeight, fontSize, fontVariant)
 {
     this.letterSpacing = letterSpacing;
 }
Esempio n. 8
0
 public void setFontInfo(FontInfo fontInfo)
 {
     this.fontInfo = fontInfo;
 }