Exemple #1
0
        public static MFont Create(string family, int size, MFontStyles style = MFontStyles.Regular)
        {
            var cacheEntry = cachedM.FirstOrDefault(m => m != null && m.Family == family && m.Size == size && m.Style == style);

            if (cacheEntry == null)
            {
                cacheEntry = new MFont(family, size, style);
                cachedM.Add(cacheEntry);
            }
            return(cacheEntry);
        }
Exemple #2
0
 private MFont(string family, int size, MFontStyles style)
 {
     this.family = family;
     this.size   = size;
     this.style  = style;
 }