mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 16:38:08 +00:00
write fontnames with default endcoding for swfs having version 5 or less
This commit is contained in:
@@ -2270,7 +2270,6 @@ public class AVM2Code implements Cloneable {
|
||||
new AVM2DeobfuscatorSimple().deobfuscate(path, classIndex, isStatic, scriptIndex, abc, constants, trait, info, body);
|
||||
new AVM2DeobfuscatorRegisters().deobfuscate(path, classIndex, isStatic, scriptIndex, abc, constants, trait, info, body);
|
||||
new AVM2DeobfuscatorJumps().deobfuscate(path, classIndex, isStatic, scriptIndex, abc, constants, trait, info, body);
|
||||
//body.getCode().checkValidOffsets(body); // todo: only for debugging. checkValidOffsets can be made private later
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,11 @@ public class DefineFont2Tag extends FontTag {
|
||||
sos.writeUB(1, fontFlagsItalic ? 1 : 0);
|
||||
sos.writeUB(1, fontFlagsBold ? 1 : 0);
|
||||
sos.writeLANGCODE(languageCode);
|
||||
sos.writeNetString(fontName, Utf8Helper.charset); // todo: check swf version and write non utf-8 for version < 6
|
||||
if (swf.version >= 6) {
|
||||
sos.writeNetString(fontName, Utf8Helper.charset);
|
||||
} else {
|
||||
sos.writeNetString(fontName);
|
||||
}
|
||||
int numGlyphs = glyphShapeTable.size();
|
||||
sos.writeUI16(numGlyphs);
|
||||
|
||||
|
||||
@@ -219,7 +219,11 @@ public class DefineFont3Tag extends FontTag {
|
||||
sos.writeUB(1, fontFlagsItalic ? 1 : 0);
|
||||
sos.writeUB(1, fontFlagsBold ? 1 : 0);
|
||||
sos.writeLANGCODE(languageCode);
|
||||
sos.writeNetString(fontName, Utf8Helper.charset); // todo: check swf version and write non utf-8 for version < 6
|
||||
if (swf.version >= 6) {
|
||||
sos.writeNetString(fontName, Utf8Helper.charset);
|
||||
} else {
|
||||
sos.writeNetString(fontName);
|
||||
}
|
||||
sos.writeUI16(numGlyphs);
|
||||
|
||||
for (long offset : offsetTable) {
|
||||
|
||||
@@ -122,7 +122,11 @@ public class DefineFontInfo2Tag extends Tag implements CharacterIdTag {
|
||||
@Override
|
||||
public void getData(SWFOutputStream sos) throws IOException {
|
||||
sos.writeUI16(fontID);
|
||||
sos.writeNetString(fontName, Utf8Helper.charset); // todo: check swf version and write non utf-8 for version < 6
|
||||
if (swf.version >= 6) {
|
||||
sos.writeNetString(fontName, Utf8Helper.charset);
|
||||
} else {
|
||||
sos.writeNetString(fontName);
|
||||
}
|
||||
sos.writeUB(2, reserved);
|
||||
sos.writeUB(1, fontFlagsSmallText ? 1 : 0);
|
||||
sos.writeUB(1, fontFlagsShiftJIS ? 1 : 0);
|
||||
|
||||
@@ -120,7 +120,11 @@ public class DefineFontInfoTag extends Tag implements CharacterIdTag {
|
||||
@Override
|
||||
public void getData(SWFOutputStream sos) throws IOException {
|
||||
sos.writeUI16(fontId);
|
||||
sos.writeNetString(fontName, Utf8Helper.charset); // todo: check swf version and write non utf-8 for version < 6
|
||||
if (swf.version >= 6) {
|
||||
sos.writeNetString(fontName, Utf8Helper.charset);
|
||||
} else {
|
||||
sos.writeNetString(fontName);
|
||||
}
|
||||
sos.writeUB(2, reserved);
|
||||
sos.writeUB(1, fontFlagsSmallText ? 1 : 0);
|
||||
sos.writeUB(1, fontFlagsShiftJIS ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user