示例#1
0
 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;
 }
示例#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);
        }
示例#4
0
 public void AddFont(GDIFont font)
 {
     string sig = GetSignature(font.Name, font.Size, font.FontStyle);
     if (!fontCache.ContainsKey(sig))
     {
         fontCache.Add(sig, font);
     }
 }
示例#5
0
        public void AddFont(GDIFont font)
        {
            string sig = GetSignature(font.Name, font.Size, font.FontStyle);

            if (!fontCache.ContainsKey(sig))
            {
                fontCache.Add(sig, font);
            }
        }
示例#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;
 }
示例#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;
 }
示例#8
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;
        }
示例#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);
        }