public static void Register(Properties attributes) { string path; string alias = null; path = attributes.Remove("path"); alias = attributes.Remove("alias"); FontImp.Register(path, alias); }
/// <summary> /// Register a font by giving explicitly the font family and name. /// </summary> /// <param name="familyName">the font family</param> /// <param name="fullName">the font name</param> /// <param name="path">the font path</param> public static void RegisterFamily(string familyName, string fullName, string path) { FontImp.RegisterFamily(familyName, fullName, path); }
/// <summary> /// Register all the fonts in a directory and possibly its subdirectories. /// @since 2.1.2 /// </summary> /// <param name="dir">the directory</param> /// <param name="scanSubdirectories">recursively scan subdirectories if true</param> /// <returns>the number of fonts registered</returns> public static int RegisterDirectory(string dir, bool scanSubdirectories) { return(FontImp.RegisterDirectory(dir, scanSubdirectories)); }
/// <summary> /// Register all the fonts in a directory. /// </summary> /// <param name="dir">the directory</param> /// <returns>the number of fonts registered</returns> public static int RegisterDirectory(string dir) { return(FontImp.RegisterDirectory(dir)); }
/// <summary> /// Register fonts in some probable directories. It usually works in Windows, /// Linux and Solaris. /// </summary> /// <returns>the number of fonts registered</returns> public static int RegisterDirectories() { return(FontImp.RegisterDirectories()); }
/// <summary> /// Register a ttf- or a ttc-file and use an alias for the font contained in the ttf-file. /// </summary> /// <param name="path">the path to a ttf- or ttc-file</param> /// <param name="alias">the alias you want to use for the font</param> public static void Register(string path, string alias) { FontImp.Register(path, alias); }
/// <summary> /// Checks if a certain font is registered. /// </summary> /// <param name="fontname">the name of the font that has to be checked</param> /// <returns>true if the font is found</returns> public static bool IsRegistered(string fontname) { return(FontImp.IsRegistered(fontname)); }
/// <summary> /// Constructs a Font-object. /// </summary> /// <param name="attributes">the attributes of a Font object</param> /// <returns>a Font object</returns> public static Font GetFont(Properties attributes) { FontImp.DefaultEmbedding = _defaultEmbedding; FontImp.DefaultEncoding = _defaultEncoding; return(FontImp.GetFont(attributes)); }
/// <summary> /// Constructs a Font-object. /// </summary> /// <param name="fontname">the name of the font</param> /// <param name="encoding">the encoding of the font</param> /// <param name="embedded">true if the font is to be embedded in the PDF</param> /// <param name="size">the size of this font</param> /// <param name="style">the style of this font</param> /// <param name="color">the Color of this font</param> /// <param name="cached">true if the font comes from the cache or is added to the cache if new, false if the font is always created new</param> /// <returns>a Font object</returns> public static Font GetFont(string fontname, string encoding, bool embedded, float size, int style, BaseColor color, bool cached) { return(FontImp.GetFont(fontname, encoding, embedded, size, style, color, cached)); }