https://github.com/source-foundry/java-glyph-tester
A tool for testing the JDK font rendering behaviour
https://github.com/source-foundry/java-glyph-tester
Last synced: about 1 year ago
JSON representation
A tool for testing the JDK font rendering behaviour
- Host: GitHub
- URL: https://github.com/source-foundry/java-glyph-tester
- Owner: source-foundry
- License: mit
- Created: 2016-05-01T19:40:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-06-15T17:58:39.000Z (almost 5 years ago)
- Last Synced: 2025-01-09T06:49:52.246Z (about 1 year ago)
- Language: Java
- Size: 26.4 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Java Glyph Tester
A tool for testing the JDK font rendering behaviour
###Build
This project uses maven to build : `mvn clean install` builds the uberjar necessary to run the tool.
###Run
Below command will generate an image for all glyphs contained in Hack-Regular, at size 14, using c:\tmp as output directory
`java -jar java-glyphtester-0.1.jar --fontfile C:\Users\jorgheymans\Downloads\Hack-v2_020-ttf\Hack-Regular.ttf --fontsize 14 --fontstyle
regular --outputdirectory c:\tmp`
If you only want to test one or more specific glyphs you can specify them at the end like this:
`java -jar java-glyphtester-0.1.jar --fontfile C:\Users\jorgheymans\Downloads\Hack-v2_020-ttf\Hack-Regular.ttf --fontsize 14 --fontstyle
regular --outputdirectory c:\tmp A B C D`
Add --repeatGlyph to repeat the glyph in the output, for example --glyphRepeat 5 will render aaaaa instead of just a.
Note that per glyph 8 images are generated, one for each aliasing mode available in the standard jdk:
- RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT
- RenderingHints.VALUE_TEXT_ANTIALIAS_GASP
- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR
- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB
- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR
- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB
- RenderingHints.VALUE_TEXT_ANTIALIAS_OFF
- RenderingHints.VALUE_TEXT_ANTIALIAS_ON
See https://docs.oracle.com/javase/7/docs/api/java/awt/RenderingHints.html for more info