Skip to content

Commit

Permalink
Install a profile with our fonts as default.
Browse files Browse the repository at this point in the history
Possible workaround for #13, but attn! installs our fonts to the user's
profile! (or at least tries to …)
  • Loading branch information
thvitt committed May 22, 2017
1 parent eb33527 commit 88d861f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@
<filtering>false</filtering>
<targetPath>${project.build.directory}/www</targetPath>
</resource>
<resource>
<directory>src/main/profile</directory>
<filtering>false</filtering>
<targetPath>${project.build.directory}/profile</targetPath>
</resource>
</resources>
</build>
</profile>
Expand Down Expand Up @@ -433,6 +438,20 @@
</build>
</profile>

<profile>
<id>install-fonts</id>
<activation><activeByDefault>true</activeByDefault></activation>
<build>
<resources>
<resource>
<directory>src/main/web/webfonts</directory>
<targetPath>${user.home}/.fonts</targetPath>
<includes><include>*.ttf</include></includes>
</resource>
</resources>
</build>
</profile>

<profile>
<id>exist</id>
<properties>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/faustedition/gen/DiplomaticConversion.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class DiplomaticConversion {

public static Path root = Paths.get("data/xml/");
public static Path target = Paths.get("target");
public static Path profile = target.resolve("profile");
public static final Path diplomatic_path = target.resolve("www").resolve("transcript").resolve("diplomatic");
private static String serverURL;

Expand Down Expand Up @@ -219,6 +220,7 @@ public static void main(final String[] args) throws IOException {
logger.info(MessageFormat.format("Web server runs on {0}", serverURL));
baseCmdLine = ImmutableList.of(
System.getProperty("phantomjs.binary", "/usr/local/bin/phantomjs"),
"--profile", profile,
debugPhantomJS? "--debug=true" : "",
"rendersvgs.js",
serverURL);
Expand Down
6 changes: 6 additions & 0 deletions src/main/profile/prefs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
user_pref("font.name.monospace.x-unicode", "Ubuntu Mono");
user_pref("font.name.monospace.x-western", "Ubuntu Mono");
user_pref("font.name.sans-serif.x-unicode", "Ubuntu Faust");
user_pref("font.name.sans-serif.x-western", "Ubuntu Faust");
user_pref("font.name.serif.x-unicode", "Gentium Plus");
user_pref("font.name.serif.x-western", "Gentium Plus");

0 comments on commit 88d861f

Please sign in to comment.