Ejemplo n.º 1
0
        //
        // static methods
        //

        #region public static PDFFontResource Load(PDFFontDefinition defn, string resourceName)

        /// <summary>
        /// Loads a PDFFontResource based on the definition and name
        /// </summary>
        /// <param name="defn"></param>
        /// <param name="resourceName"></param>
        /// <returns></returns>
        public static PDFFontResource Load(PDFFontDefinition defn, string resourceName)
        {
            if (null == defn)
            {
                throw new ArgumentNullException("defn");
            }

            if (string.IsNullOrEmpty(resourceName))
            {
                throw new ArgumentNullException("resourceName");
            }

            PDFFontWidths   widths = defn.GetWidths();
            PDFFontResource rsrc   = new PDFFontResource(defn, widths, resourceName);

            return(rsrc);
        }