public FontAnalysis GetAnalysis() { if (_analysis == null) { _analysis = TypographyAnalyzer.Analyze(this); } return(_analysis); }
/// <summary> /// Creates a FontAnalysis object for a FontVariant and ensures the custom /// search map for the font is loaded /// </summary> /// <param name="variant"></param> /// <returns></returns> public static FontAnalysis Analyze(FontVariant variant) { var analysis = new FontAnalysis(variant.FontFace); if (analysis.HasGlyphNames) { PrepareSearchMap(variant, analysis.GlyphNameMappings); } return(analysis); }
/// <summary> /// Creates a FontAnalysis object for a FontVariant and ensures the custom /// search map for the font is loaded /// </summary> /// <param name="variant"></param> /// <returns></returns> public static FontAnalysis Analyze(FontVariant variant) { var analysis = new FontAnalysis(variant.FontFace); if (analysis.GlyphNames != null && analysis.GlyphNames.Count > 0) { PrepareSearchMap(variant, analysis.GlyphNames.ToList()); } // TODO : Parse Design & Script Language Tags // if (!string.IsNullOrWhiteSpace(analysis.DesignLanguages)) // { // var langs = analysis.DesignLanguages.Split(','); // } return(analysis); }