public override bool Equals(System.Object object_Renamed) { bool isEqual = false; if (base.Equals(object_Renamed) && (object_Renamed is DefineFontInfo)) { DefineFontInfo defineFontInfo = (DefineFontInfo)object_Renamed; // [paul] Checking that the font fields are equal would // lead to an infinite loop, because DefineFont contains a // reference to it's DefineFontInfo. if (equals(defineFontInfo.name, this.name) && (defineFontInfo.shiftJIS == this.shiftJIS) && (defineFontInfo.ansi == this.ansi) && (defineFontInfo.italic == this.italic) && (defineFontInfo.bold == this.bold) && ArrayUtil.equals(defineFontInfo.codeTable, this.codeTable) && (defineFontInfo.langCode == this.langCode)) { isEqual = true; } } return(isEqual); }
public override void defineFontInfo2(DefineFontInfo tag) { tags.Add(tag); }
public virtual void defineFontInfo2(DefineFontInfo tag) { }
private Tag decodeDefineFontInfo(int code, int length) { DefineFontInfo t; t = new DefineFontInfo(code); int pos = r.Offset; int idref = r.readUI16(); t.font = (DefineFont1) dict.getTag(idref); if (t.font.fontInfo != null) { handler.error("font " + idref + " info redefined"); } t.font.fontInfo = t; t.name = r.readLengthString(); r.syncBits(); r.readUBits(3); // reserved t.shiftJIS = r.readBit(); t.ansi = r.readBit(); t.italic = r.readBit(); t.bold = r.readBit(); t.wideCodes = r.readBit(); if (code == Flash.Swf.TagValues.stagDefineFontInfo2) { if (!t.wideCodes) handler.error("widecodes must be true in DefineFontInfo2"); if (SwfVersion < 6) handler.error("DefineFont2 not valid before SWF6"); t.langCode = r.readUI8(); } length -= (r.Offset - pos); if (t.wideCodes) { length = length / 2; t.codeTable = new char[length]; for (int i = 0; i < length; i++) { t.codeTable[i] = (char) r.readUI16(); } } else { t.codeTable = new char[length]; for (int i = 0; i < length; i++) { t.codeTable[i] = (char) r.readUI8(); } } return t; }