diff --git a/designer-base/src/main/java/com/fr/design/ui/Assistant.java b/designer-base/src/main/java/com/fr/design/ui/Assistant.java index 3962692c7..930aa32bb 100644 --- a/designer-base/src/main/java/com/fr/design/ui/Assistant.java +++ b/designer-base/src/main/java/com/fr/design/ui/Assistant.java @@ -6,14 +6,12 @@ import com.teamdev.jxbrowser.chromium.BrowserContext; import com.teamdev.jxbrowser.chromium.ProtocolService; import com.teamdev.jxbrowser.chromium.URLResponse; -import javax.activation.MimetypesFileTypeMap; import java.io.DataInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; /** * @author richie @@ -50,6 +48,18 @@ public class Assistant { if (path.endsWith(".svg")) { return "image/svg+xml"; } + if (path.endsWith(".png")) { + return "image/png"; + } + if (path.endsWith(".woff")) { + return "font/woff"; + } + if (path.endsWith(".ttf")) { + return "truetype"; + } + if (path.endsWith(".eot")) { + return "embedded-opentype"; + } Path file = new File(path).toPath(); try { return Files.probeContentType(file); diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index 3434e1ae3..c1d533e8d 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -3,8 +3,8 @@