Esempio n. 1
0
 protected override RFont CreateFontInt(RFontFamily family, double size, RFontStyle style)
 {
     return new FontAdapter(new Typeface(((FontFamilyAdapter)family).FontFamily, GetFontStyle(style), GetFontWidth(style), FontStretches.Normal), size);
 }
 protected override RFont CreateFontInt(RFontFamily family, double size, RFontStyle style)
 {
     var fontStyle = (XFontStyle)((int)style);
     var xFont = new XFont(((FontFamilyAdapter)family).FontFamily.Name, size, fontStyle, new XPdfFontOptions(PdfFontEncoding.Unicode));
     return new FontAdapter(xFont);
 }
Esempio n. 3
0
 /// <summary>
 /// Get font instance by given font family instance, size and style.<br/>
 /// Used to support custom fonts that require explicit font family instance to be created.
 /// </summary>
 /// <param name="family">the font family instance</param>
 /// <param name="size">font size</param>
 /// <param name="style">font style</param>
 /// <returns>font instance</returns>
 internal RFont CreateFont(RFontFamily family, double size, RFontStyle style)
 {
     return CreateFontInt(family, size, style);
 }
Esempio n. 4
0
 /// <summary>
 /// Get font instance by given font family instance, size and style.<br/>
 /// Used to support custom fonts that require explicit font family instance to be created.
 /// </summary>
 /// <param name="family">the font family instance</param>
 /// <param name="size">font size</param>
 /// <param name="style">font style</param>
 /// <returns>font instance</returns>
 protected abstract RFont CreateFontInt(RFontFamily family, double size, RFontStyle style);
Esempio n. 5
0
 /// <summary>
 /// Get font instance by given font family instance, size and style.<br/>
 /// Used to support custom fonts that require explicit font family instance to be created.
 /// </summary>
 /// <param name="family">the font family instance</param>
 /// <param name="size">font size</param>
 /// <param name="style">font style</param>
 /// <returns>font instance</returns>
 protected abstract RFont CreateFontInt(RFontFamily family, double size, RFontStyle style);
Esempio n. 6
0
 /// <summary>
 /// Adds a font family to be used.
 /// </summary>
 /// <param name="fontFamily">The font family to add.</param>
 public void AddFontFamily(RFontFamily fontFamily)
 {
     _fontsHandler.AddFontFamily(fontFamily);
 }
Esempio n. 7
0
 /// <summary>
 /// Get font instance by given font family instance, size and style.<br/>
 /// Used to support custom fonts that require explicit font family instance to be created.
 /// </summary>
 /// <param name="family">the font family instance</param>
 /// <param name="size">font size</param>
 /// <param name="style">font style</param>
 /// <returns>font instance</returns>
 internal RFont CreateFont(RFontFamily family, double size, RFontStyle style)
 {
     return(CreateFontInt(family, size, style));
 }
Esempio n. 8
0
 /// <summary>
 /// Adds a font family to be used.
 /// </summary>
 /// <param name="fontFamily">The font family to add.</param>
 public void AddFontFamily(RFontFamily fontFamily)
 {
     _fontsHandler.AddFontFamily(fontFamily);
 }
 protected override RFont CreateFontInt(RFontFamily family, double size, RFontStyle style)
 {
     var fontStyle = (FontStyle)((int)style);
     return new FontAdapter(new Font(((FontFamilyAdapter)family).FontFamily, (float)size, fontStyle));
 }
Esempio n. 10
0
 protected override RFont CreateFontInt(RFontFamily family, double size, RFontStyle style)
 {
     return new FontAdapter(family.Name, size, style);
 }
Esempio n. 11
0
        /// <summary>
        /// Adds a font family to be used.
        /// </summary>
        /// <param name="fontFamily">The font family to add.</param>
        public void AddFontFamily(RFontFamily fontFamily)
        {
            ArgChecker.AssertArgNotNull(fontFamily, "family");

            _existingFontFamilies[fontFamily.Name] = fontFamily;
        }