mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 19:04:38 +00:00
set font creation and modification time to the modification time of the swf file
This commit is contained in:
@@ -131,7 +131,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_int.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "Int not found. Index: " + index, ex);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_namespace.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "Namespace not found. Index: " + index, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_namespace_set.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "NamespaceSet not found. Index: " + index, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_uint.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "UInt not found. Index: " + index, ex);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_double.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "Double not found. Index: " + index, ex);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_decimal.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "Decimal not found. Index: " + index, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class AVM2ConstantPool {
|
||||
try {
|
||||
return constant_string.get(index);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
logger.log(Level.SEVERE, "Multiname not found. Index: " + index, ex);
|
||||
logger.log(Level.SEVERE, "String not found. Index: " + index, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.flash.ApplicationInfo;
|
||||
import com.jpexs.decompiler.flash.EventListener;
|
||||
import com.jpexs.decompiler.flash.RetryTask;
|
||||
import com.jpexs.decompiler.flash.RunnableIOEx;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.FontExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.FontExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.shape.PathExporter;
|
||||
@@ -41,6 +42,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -147,6 +149,16 @@ public class FontExporter {
|
||||
f.getEngine().setCopyrightYear(cop == null ? "" : cop);
|
||||
f.setAuthor(ApplicationInfo.shortApplicationVerName);
|
||||
f.setVersion("1.0");
|
||||
|
||||
SWF swf = t.getSwf();
|
||||
if (swf != null && swf.swfList != null && swf.swfList.sourceInfo != null) {
|
||||
String fileName = swf.swfList.sourceInfo.getFile();
|
||||
if (fileName != null) {
|
||||
Date date = new Date(new File(fileName).lastModified());
|
||||
f.setCreationDate(date);
|
||||
f.setModificationDate(date);
|
||||
}
|
||||
}
|
||||
|
||||
int ascent = t.getAscent();
|
||||
if (ascent != -1) {
|
||||
|
||||
@@ -248,7 +248,7 @@ public abstract class TextTag extends CharacterTag implements DrawableTag {
|
||||
double descent = 0;
|
||||
double lineDistance = 0;
|
||||
|
||||
List<SHAPE> glyphs = new ArrayList<>();
|
||||
List<SHAPE> glyphs = null;
|
||||
boolean firstLine = true;
|
||||
double top = 0;
|
||||
List<Integer> allLeftMargins = new ArrayList<>();
|
||||
@@ -403,7 +403,7 @@ public abstract class TextTag extends CharacterTag implements DrawableTag {
|
||||
int textHeight = 12;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
List<SHAPE> glyphs = new ArrayList<>();
|
||||
List<SHAPE> glyphs = null;
|
||||
for (TEXTRECORD rec : textRecords) {
|
||||
if (rec.styleFlagsHasColor) {
|
||||
if (numText == 2) {
|
||||
@@ -458,7 +458,7 @@ public abstract class TextTag extends CharacterTag implements DrawableTag {
|
||||
int textHeight = 12;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
List<SHAPE> glyphs = new ArrayList<>();
|
||||
List<SHAPE> glyphs = null;
|
||||
ExportRectangle result = null;
|
||||
for (TEXTRECORD rec : textRecords) {
|
||||
if (rec.styleFlagsHasFont) {
|
||||
|
||||
Reference in New Issue
Block a user