mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-09 01:18:09 +00:00
Fixed Font names charset
This commit is contained in:
@@ -515,7 +515,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
baos.write(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads one netstring (length + string) value from the stream
|
||||
*
|
||||
@@ -526,23 +526,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
public String readNetString(String name) throws IOException {
|
||||
newDumpLevel(name, "string");
|
||||
int length = readEx();
|
||||
String ret = new String(readBytesInternalEx(length));
|
||||
endDumpLevel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads one netstring (length + string) value from the stream
|
||||
*
|
||||
* @param name
|
||||
* @param charset
|
||||
* @return String value
|
||||
* @throws IOException
|
||||
*/
|
||||
public String readNetString(String name, Charset charset) throws IOException {
|
||||
newDumpLevel(name, "string");
|
||||
int length = readEx();
|
||||
String ret = new String(readBytesInternalEx(length), charset);
|
||||
String ret = new String(readBytesInternalEx(length), swf.getCharset());
|
||||
endDumpLevel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -138,11 +138,7 @@ public class DefineFont2Tag extends FontTag {
|
||||
fontFlagsItalic = sis.readUB(1, "fontFlagsItalic") == 1;
|
||||
fontFlagsBold = sis.readUB(1, "fontFlagsBold") == 1;
|
||||
languageCode = sis.readLANGCODE("languageCode");
|
||||
if (swf.version >= 6) {
|
||||
fontName = sis.readNetString("fontName", Utf8Helper.charset);
|
||||
} else {
|
||||
fontName = sis.readNetString("fontName");
|
||||
}
|
||||
fontName = sis.readNetString("fontName");
|
||||
int numGlyphs = sis.readUI16("numGlyphs");
|
||||
long[] offsetTable = new long[numGlyphs];
|
||||
long pos = sis.getPos();
|
||||
|
||||
@@ -132,11 +132,7 @@ public class DefineFont3Tag extends FontTag {
|
||||
fontFlagsItalic = sis.readUB(1, "fontFlagsItalic") == 1;
|
||||
fontFlagsBold = sis.readUB(1, "fontFlagsBold") == 1;
|
||||
languageCode = sis.readLANGCODE("languageCode");
|
||||
if (swf.version >= 6) {
|
||||
fontName = sis.readNetString("fontName", Utf8Helper.charset);
|
||||
} else {
|
||||
fontName = sis.readNetString("fontName");
|
||||
}
|
||||
fontName = sis.readNetString("fontName");
|
||||
int numGlyphs = sis.readUI16("numGlyphs");
|
||||
long[] offsetTable = new long[numGlyphs];
|
||||
long pos = sis.getPos();
|
||||
|
||||
@@ -92,11 +92,7 @@ public class DefineFontInfo2Tag extends FontInfoTag {
|
||||
@Override
|
||||
public final void readData(SWFInputStream sis, ByteArrayRange data, int level, boolean parallel, boolean skipUnusualTags, boolean lazy) throws IOException {
|
||||
fontID = sis.readUI16("fontID");
|
||||
if (swf.version >= 6) {
|
||||
fontName = sis.readNetString("fontName", Utf8Helper.charset);
|
||||
} else {
|
||||
fontName = sis.readNetString("fontName");
|
||||
}
|
||||
fontName = sis.readNetString("fontName");
|
||||
reserved = (int) sis.readUB(2, "reserved");
|
||||
fontFlagsSmallText = sis.readUB(1, "fontFlagsSmallText") == 1;
|
||||
fontFlagsShiftJIS = sis.readUB(1, "fontFlagsShiftJIS") == 1;
|
||||
|
||||
@@ -88,11 +88,7 @@ public class DefineFontInfoTag extends FontInfoTag {
|
||||
@Override
|
||||
public final void readData(SWFInputStream sis, ByteArrayRange data, int level, boolean parallel, boolean skipUnusualTags, boolean lazy) throws IOException {
|
||||
fontID = sis.readUI16("fontId");
|
||||
if (swf.version >= 6) {
|
||||
fontName = sis.readNetString("fontName", Utf8Helper.charset);
|
||||
} else {
|
||||
fontName = sis.readNetString("fontName");
|
||||
}
|
||||
fontName = sis.readNetString("fontName");
|
||||
reserved = (int) sis.readUB(2, "reserved");
|
||||
fontFlagsSmallText = sis.readUB(1, "fontFlagsSmallText") == 1;
|
||||
fontFlagsShiftJIS = sis.readUB(1, "fontFlagsShiftJIS") == 1;
|
||||
|
||||
Reference in New Issue
Block a user