File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
src/main/java/org/sourcefoundry/glyphtester Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Java Glyph Tester
2
2
3
3
A tool for testing the JDK font rendering behaviour
4
+
5
+ ###Build
6
+ This project uses maven to build : ` mvn clean install ` builds the uberjar necessary to run the tool.
7
+
8
+ ###Run
9
+ Below command will generate an image for all glyphs contained in Hack-Regular, at size 14, using c:\tmp as output directory
10
+
11
+ `java -jar java-glyphtester-0.1.jar --fontfile C:\Users\jorgheymans\Downloads\Hack-v2_020-ttf\Hack-Regular.ttf --fontsize 14 --fontstyle
12
+ regular --fontname hack --outputdirectory c:\tmp`
13
+
14
+ If you only want to test one or more specific glyphs you can specify them at the end like this:
15
+
16
+ `java -jar java-glyphtester-0.1.jar --fontfile C:\Users\jorgheymans\Downloads\Hack-v2_020-ttf\Hack-Regular.ttf --fontsize 14 --fontstyle
17
+ regular --fontname hack --outputdirectory c:\tmp A B C D`
18
+
19
+ Note that per glyph 8 images are generated, one for each aliasing mode available in the standard jdk:
20
+ RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT
21
+ RenderingHints.VALUE_TEXT_ANTIALIAS_GASP
22
+ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR
23
+ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB
24
+ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR
25
+ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB
26
+ RenderingHints.VALUE_TEXT_ANTIALIAS_OFF
27
+ RenderingHints.VALUE_TEXT_ANTIALIAS_ON
28
+
29
+ See https://docs.oracle.com/javase/7/docs/api/java/awt/RenderingHints.html for more info
Original file line number Diff line number Diff line change 14
14
<target >1.7</target >
15
15
</configuration >
16
16
</plugin >
17
+ <plugin >
18
+ <artifactId >maven-shade-plugin</artifactId >
19
+ <version >2.4.3</version >
20
+ <executions >
21
+ <execution >
22
+ <phase >package</phase >
23
+ <goals >
24
+ <goal >shade</goal >
25
+ </goals >
26
+ <configuration >
27
+ <transformers >
28
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" >
29
+ <manifestEntries >
30
+ <main-class >org.sourcefoundry.glyphtester.Main</main-class >
31
+ <build-number >1</build-number >
32
+ </manifestEntries >
33
+ </transformer >
34
+ </transformers >
35
+ </configuration >
36
+ </execution >
37
+ </executions >
38
+ </plugin >
17
39
</plugins >
18
40
</build >
19
41
<dependencies >
Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ public class CommandLine {
32
32
33
33
@ Parameter (names = {"--outputdirectory" }, required = true )
34
34
String outputDirectory ;
35
+
35
36
@ Parameter (names = {"--renderinghints" })
36
37
String renderingHints ;
38
+
37
39
@ Parameter
38
40
List <String > glyphsToTest ;
39
41
private JCommander jCommander = null ;
You can’t perform that action at this time.
0 commit comments