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;
 }
Beispiel #2
0
        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);
     }
 }
Beispiel #5
0
        public void AddFont(GDIFont font)
        {
            string sig = GetSignature(font.Name, font.Size, font.FontStyle);

            if (!fontCache.ContainsKey(sig))
            {
                fontCache.Add(sig, font);
            }
        }
Beispiel #6
0
 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;
 }
Beispiel #7
0
 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;
        }
Beispiel #9
0
        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);
        }