mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 00:06:17 +00:00
Fixed #2239 Default font name detection
Fixed #2239 Exporting TTF font on Linux
This commit is contained in:
@@ -128,7 +128,7 @@ public class FontExporter {
|
||||
currentIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class FontExporter {
|
||||
final double divider = t.getDivider();
|
||||
|
||||
File ttfFile = file;
|
||||
|
||||
|
||||
if (mode == FontExportMode.WOFF) {
|
||||
ttfFile = File.createTempFile("ffdec_export", ".ttf");
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class FontExporter {
|
||||
if (fontName.length() == 0) {
|
||||
fontName = "noname";
|
||||
}
|
||||
|
||||
|
||||
Fontastic f = new Fontastic(fontName, ttfFile);
|
||||
String cop = t.getCopyright();
|
||||
|
||||
|
||||
@@ -376,11 +376,11 @@ public abstract class FontTag extends DrawableTag implements AloneTag {
|
||||
}
|
||||
|
||||
if (installedFontsByFamily.containsKey("Times New Roman")) {
|
||||
defaultFontName = "Times New Roman";
|
||||
defaultFontName = installedFontsByFamily.get("Times New Roman").keySet().iterator().next();
|
||||
} else if (installedFontsByFamily.containsKey("Arial")) {
|
||||
defaultFontName = "Arial";
|
||||
defaultFontName = installedFontsByFamily.get("Arial").keySet().iterator().next();
|
||||
} else {
|
||||
defaultFontName = installedFontsByFamily.keySet().iterator().next();
|
||||
defaultFontName = installedFontsByFamily.get(installedFontsByFamily.keySet().iterator().next()).keySet().iterator().next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user