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

            if (!fontCache.ContainsKey(sig))
            {
                fontCache.Add(sig, font);
            }
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }