Skip to content

Commit

Permalink
updated for fixing macos fonts issue, metanorma/metanorma-iso#910
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Apr 25, 2023
1 parent 0bbf8ac commit 50b1103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/metanorma/fop/fontConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public void setFontManifest(File fFontManifest) {
Path fontPathNew = Paths.get(tmpfilepath.toString(), fontFile.getName());
Files.copy(fontFile.toPath(), fontPathNew, StandardCopyOption.REPLACE_EXISTING);
fontPath__ = fontPathNew.toAbsolutePath().toString();
registerFont(ge, fontPath__);
} catch (IOException ex) {
ex.printStackTrace();
}
Expand Down Expand Up @@ -286,7 +287,8 @@ public void setFontManifest(File fFontManifest) {
fopFonts.stream()
.filter(f -> !f.isReadyToUse())
.filter(f -> f.getSimulate_style() != null && f.getSimulate_style().equals("true"))
.filter(f -> fontPath_.toLowerCase().contains(f.getEmbed_url().toLowerCase()))
.filter(f -> fontPath_.toLowerCase().contains(f.getEmbed_url().toLowerCase()) ||
(f.getAlternate().size() != 0 && fontPath_.toLowerCase().contains(f.getAlternate().get(0).getEmbed_url().toLowerCase())))
.filter(f -> f.contains(fontName))
.forEach(f -> {
f.setEmbed_url(fontPath_);
Expand Down

0 comments on commit 50b1103

Please sign in to comment.