Bloom.Publish.EpubMaker.GetFontsUsed C# (CSharp) Method

GetFontsUsed() public static method

First step of embedding fonts: determine what are used in the document. Eventually we may load each page into a DOM and use JavaScript to ask each bit of text what actual font and face it is using. For now we examine the stylesheets and collect the font families they mention.
public static GetFontsUsed ( string bookPath, bool includeFallbackFonts ) : IEnumerable
bookPath string
includeFallbackFonts bool
return IEnumerable
        public static IEnumerable<string> GetFontsUsed(string bookPath, bool includeFallbackFonts)
        {
            var result = new HashSet<string>();
            foreach (var ss in Directory.GetFiles(bookPath, "*.css"))
            {
                var root = RobustFile.ReadAllText(ss, Encoding.UTF8);
                HtmlDom.FindFontsUsedInCss(root, result, includeFallbackFonts);
            }
            return result;
        }