//--------------------------------------------------------------------------
        //
        // Utility Methods
        //
        //--------------------------------------------------------------------------

        /// <summary> Tests whether this DefineFont4 tag is equivalent to another DefineFont4
        /// tag instance.
        ///
        /// </summary>
        /// <param name="obj">Another DefineFont4 instance to test for equality.
        /// </param>
        /// <returns> true if the given instance is considered equal to this instance
        /// </returns>
        public override bool Equals(System.Object obj)
        {
            bool isEqual = false;

            if (obj is DefineFont4 && base.Equals(obj))
            {
                DefineFont4 defineFont = (DefineFont4)obj;

                if ((defineFont.hasFontData == this.hasFontData) && (defineFont.italic == this.italic) && (defineFont.bold == this.bold) && (defineFont.langCode == this.langCode) && (defineFont.smallText == this.smallText) && equals(defineFont.fontName, this.fontName) && SupportClass.ArraySupport.Equals(defineFont.data, this.data))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
		public virtual void  defineFont4(DefineFont4 tag)
		{
		}
		private Tag decodeDefineFont4(int length)
		{
			DefineFont4 t = new DefineFont4();
			int pos = r.Offset;
			
			int id = r.readUI16();
			
			r.syncBits();
			r.readUBits(5); // reserved
			t.hasFontData = r.readBit();
			//t.smallText = r.readBit();
			t.italic = r.readBit();
			t.bold = r.readBit();
			
			//t.langCode = r.readUI8();
			t.fontName = r.readString();
			
			if (t.hasFontData)
			{
				length -= (r.Offset - pos);
				t.data = new byte[length];
				r.readFully(t.data);
			}
			
			dict.add(id, t);
			dict.addFontFace(t);
			return t;
		}