public IFontStyleInfo ProduceNewFontStyleInfo(string FamilyName, float size, System.Drawing.FontStyle theStyle) { IFontInfo NewFont = new GDIFont(FamilyName, size, theStyle); IFontStyleInfo NewFontStyle = new GDIFontStyle(); NewFontStyle.Font = NewFont; return NewFontStyle; }
public GDIFont FindFont(string signature) { GDIFont found = null; fontCache.TryGetValue(signature, out found); return(found); }
public IFontStyleInfo ProduceNewFontStyleInfo(string FamilyName, float size, System.Drawing.FontStyle theStyle) { IFontInfo NewFont = new GDIFont(FamilyName, size, theStyle); IFontStyleInfo NewFontStyle = new GDIFontStyle(); NewFontStyle.Font = NewFont; return(NewFontStyle); }
public void AddFont(GDIFont font) { string sig = GetSignature(font.Name, font.Size, font.FontStyle); if (!fontCache.ContainsKey(sig)) { fontCache.Add(sig, font); } }
public GDIFont(GDIFont ExistingFont) { this.mName = ExistingFont.Name; this.mSize = ExistingFont.Size; this.mBold = ExistingFont.Bold; this.mItalic = ExistingFont.Italic; this.mUnderline = ExistingFont.Underline; this.hFont = ExistingFont.hFont; }
public IFontStyleInfo ProduceNewFontStyleInfo( string FamilyName, float size, System.Drawing.FontStyle theStyle) { GDIFontStyle result = new GDIFontStyle(); string sig = GetSignature(FamilyName, size, theStyle); GDIFont found = FindFont(sig); if (found == null) { found = new GDIFont(FamilyName, size, theStyle); AddFont(found); } result.Font = found; return result; }
public IFontStyleInfo ProduceNewFontStyleInfo( string FamilyName, float size, System.Drawing.FontStyle theStyle) { GDIFontStyle result = new GDIFontStyle(); string sig = GetSignature(FamilyName, size, theStyle); GDIFont found = FindFont(sig); if (found == null) { found = new GDIFont(FamilyName, size, theStyle); AddFont(found); } result.Font = found; return(result); }