Bloom.Publish.EpubMaker.AddFontFace C# (CSharp) Méthode

AddFontFace() static private méthode

static private AddFontFace ( StringBuilder sb, string name, string weight, string style, string path ) : void
sb StringBuilder
name string
weight string
style string
path string
Résultat void
        internal static void AddFontFace(StringBuilder sb, string name, string weight, string style, string path)
        {
            if (path == null)
                return;
            sb.AppendLineFormat("@font-face {{font-family:'{0}'; font-weight:{1}; font-style:{2}; src:url({3}) format('{4}');}}",
                name, weight, style, Path.GetFileName(path),
                Path.GetExtension(path) == ".woff" ? "woff" : "opentype");
        }