https://github.com/tonikelope/megabasterd/pull/262

https://github.com/tonikelope/megabasterd/issues/261


https://github.com/tonikelope/megabasterd/issues/188

DEFAULT FONT -> Roboto

ALTERNATE FONT -> Noto Sans CJK (Use this if you need Chinese Japanese, etc characters support but in Windows7 it might be broken, so EXPORT YOUR SETTINGS BEFORE SETING ALTERNATE FONT)
This commit is contained in:
tonikelope 2020-10-31 17:37:24 +01:00
parent a654ada7da
commit acfc018356
5 changed files with 10 additions and 9 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.29</version>
<version>7.30</version>
<packaging>jar</packaging>
<dependencies>
<dependency>

View File

@ -60,7 +60,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "7.29";
public static final String VERSION = "7.30";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
@ -71,7 +71,7 @@ public final class MainPanel {
public static final String DEFAULT_LANGUAGE = "EN";
public static final boolean DEFAULT_SMART_PROXY = false;
public static final double FORCE_GARBAGE_COLLECTION_MAX_MEMORY_PERCENT = 0.7;
public static Font GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");
public static Font GUI_FONT = createAndRegisterFont("/fonts/Roboto-Regular.ttf");
public static final float ZOOM_FACTOR = 0.8f;
public static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0";
public static final String ICON_FILE = "/images/pica_roja_big.png";
@ -658,11 +658,11 @@ public final class MainPanel {
if (_font != null) {
if (_font.equals("DEFAULT")) {
GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");
GUI_FONT = createAndRegisterFont("/fonts/Roboto-Regular.ttf");
} else {
GUI_FONT = createAndRegisterFont("/fonts/Kalam-Light.ttf");
GUI_FONT = createAndRegisterFont("/fonts/NotoSansCJK-Regular.ttc");
}
} else {

View File

@ -738,12 +738,12 @@ public class MiscTools {
public static String cleanFilename(String filename) {
return (System.getProperty("os.name").toLowerCase().contains("win") ? filename.replaceAll("[<>:\"/\\\\\\|\\?\\*\t]+", "") : filename).replaceAll("\\" + File.separator, "").replaceAll("[\\.]{1,}$", "").trim();
return (System.getProperty("os.name").toLowerCase().contains("win") ? filename.replaceAll("[<>:\"/\\\\\\|\\?\\*\t]+", "") : filename).replaceAll("\\" + File.separator, "").replaceAll("[\\.]{1,}$", "").replaceAll("[\\x00-\\x1F]", "").trim();
}
public static String cleanFilePath(String path) {
return !path.equals(".") ? ((System.getProperty("os.name").toLowerCase().contains("win") ? path.replaceAll("[<>:\"\\|\\?\\*\t]+", "") : path).replaceAll(" +\\" + File.separator, "\\" + File.separator).replaceAll("[\\.]{1,}$", "").trim()) : path;
return !path.equals(".") ? ((System.getProperty("os.name").toLowerCase().contains("win") ? path.replaceAll("[<>:\"\\|\\?\\*\t]+", "") : path).replaceAll(" +\\" + File.separator, "\\" + File.separator).replaceAll("[\\.]{1,}$", "").replaceAll("[\\x00-\\x1F]", "").trim()) : path;
}
public static byte[] genRandomByteArray(int length) {
@ -785,9 +785,10 @@ public class MiscTools {
String res = "";
if (data != null) {
if (data.startsWith("moz-extension") || data.startsWith("chrome-extension"))
if (data.startsWith("moz-extension") || data.startsWith("chrome-extension")) {
data = extensionURL2NormalLink(data);
}
try {

Binary file not shown.