Skip to content

Commit 36971ea

Browse files
committed
Initial Commit
0 parents  commit 36971ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+14298
-0
lines changed

LICENSE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Free Public License 1.0.0
2+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
3+
4+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
jME-TTF
2+
==================
3+
4+
jME-TTF is a True Type Font(.ttf) rendering system for jMonkeyEngine3.1 and newer. With this library you can render text styles loaded directly from a true type font file at run-time. Characters from the ttf file are written to a dynamically sized texture atlas and then rendered on screen using a series of quads that display each character from the atlas. When requesting a text string to display jME-TTF looks through the string to see if any characters are missing from the atlas and if so adds them, expanding the size of the atlas texture as necessary.
5+
6+
[<img
7+
src="https://dl.dropboxusercontent.com/s/ldrg036040dx3g4/c5855071bc96733bcb4db72b98356deed0003d2f.png?dl=0"
8+
alt="TEdit Screen" width="567" height="294">](https://dl.dropboxusercontent.com/s/ldrg036040dx3g4/c5855071bc96733bcb4db72b98356deed0003d2f.png?dl=0)
9+
10+
In addition to that you can opt to render scaleable text styled from a true type font file in your 3D or 2D scenes. jME-TTF can triangulate a mesh from the glyph outline of each requested character, caching new glyph meshes, and apply a material that interpolates curved sections of the glyph's contours using quadratic bezier formulas. The result is a text that can scale without pixelaltion and is fully compatible with modern GPU anti-aliasing methods.
11+
12+
[<img
13+
src="https://dl.dropboxusercontent.com/s/wmgamqzxx5ky4s6/Screenshot_2017_11_17_17.png?dl=0"
14+
alt="TEdit Screen" width="567" height="249">](https://dl.dropboxusercontent.com/s/wmgamqzxx5ky4s6/Screenshot_2017_11_17_17.png?dl=0)
15+
16+
jME-TTF provides a variety of conveniences such as getting the width of a line of text in pixels or world units, the line height, visual heights, scaling and kerning, you can even get a texture displaying blurred text. Formatting options such as vertical/horizontal alignment and text wrapping are also available.
17+
18+
Finally jME-TTF assigns several UV layers that can be taken advantage of in your own custom shaders to create a wide variety of different effects.
19+
20+
[<img
21+
src="https://dl.dropboxusercontent.com/s/oav8rjtu4aebxer/707ad177d0efb01352a00e8a81be9cf6b3b876ef.png?dl=0"
22+
alt="TEdit Screen" width="474" height="400">](https://dl.dropboxusercontent.com/s/oav8rjtu4aebxer/707ad177d0efb01352a00e8a81be9cf6b3b876ef.png?dl=0)
23+
24+
[<img
25+
src="https://dl.dropboxusercontent.com/s/puy6ebbxc2p5p0i/6983fb0efd926ecd68d1ad2220f557549e37a2c2.png?dl=0"
26+
alt="TEdit Screen" width="696" height="398">](https://dl.dropboxusercontent.com/s/puy6ebbxc2p5p0i/6983fb0efd926ecd68d1ad2220f557549e37a2c2.png?dl=0)
27+
28+
[<img
29+
src="https://dl.dropboxusercontent.com/s/fydn0y11xxckxp2/1693b179e6b26b076e9748f69eaa010188ae23b9.png?dl=0"
30+
alt="TEdit Screen" width="695" height="415">](https://dl.dropboxusercontent.com/s/fydn0y11xxckxp2/1693b179e6b26b076e9748f69eaa010188ae23b9.png?dl=0)
31+
32+
jME-TTF depends upon Google's Sfntly library available at https://github.com/rillig/sfntly
33+
34+
You can find more about jME-TTF including usage documentation at http://1337atr.weebly.com/jmettf.html

build.xml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- You may freely edit this file. See commented blocks below for -->
3+
<!-- some examples of how to customize the build. -->
4+
<!-- (If you delete it and reopen the project it will be recreated.) -->
5+
<!-- By default, only the Clean and Build commands use this build script. -->
6+
<!-- Commands such as Run, Debug, and Test only use this build script if -->
7+
<!-- the Compile on Save feature is turned off for the project. -->
8+
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9+
<!-- in the project's Project Properties dialog box.-->
10+
<project name="jME-TTF" default="default" basedir=".">
11+
<description>Builds, tests, and runs the project jME-TTF.</description>
12+
<import file="nbproject/build-impl.xml"/>
13+
<!--
14+
15+
There exist several targets which are by default empty and which can be
16+
used for execution of your tasks. These targets are usually executed
17+
before and after some main targets. They are:
18+
19+
-pre-init: called before initialization of project properties
20+
-post-init: called after initialization of project properties
21+
-pre-compile: called before javac compilation
22+
-post-compile: called after javac compilation
23+
-pre-compile-single: called before javac compilation of single file
24+
-post-compile-single: called after javac compilation of single file
25+
-pre-compile-test: called before javac compilation of JUnit tests
26+
-post-compile-test: called after javac compilation of JUnit tests
27+
-pre-compile-test-single: called before javac compilation of single JUnit test
28+
-post-compile-test-single: called after javac compilation of single JUunit test
29+
-pre-jar: called before JAR building
30+
-post-jar: called after JAR building
31+
-post-clean: called after cleaning build products
32+
33+
(Targets beginning with '-' are not intended to be called on their own.)
34+
35+
Example of inserting an obfuscator after compilation could look like this:
36+
37+
<target name="-post-compile">
38+
<obfuscate>
39+
<fileset dir="${build.classes.dir}"/>
40+
</obfuscate>
41+
</target>
42+
43+
For list of available properties check the imported
44+
nbproject/build-impl.xml file.
45+
46+
47+
Another way to customize the build is by overriding existing main targets.
48+
The targets of interest are:
49+
50+
-init-macrodef-javac: defines macro for javac compilation
51+
-init-macrodef-junit: defines macro for junit execution
52+
-init-macrodef-debug: defines macro for class debugging
53+
-init-macrodef-java: defines macro for class execution
54+
-do-jar: JAR building
55+
run: execution of project
56+
-javadoc-build: Javadoc generation
57+
test-report: JUnit report generation
58+
59+
An example of overriding the target for project execution could look like this:
60+
61+
<target name="run" depends="jME-TTF-impl.jar">
62+
<exec dir="bin" executable="launcher.exe">
63+
<arg file="${dist.jar}"/>
64+
</exec>
65+
</target>
66+
67+
Notice that the overridden target depends on the jar target and not only on
68+
the compile target as the regular run target does. Again, for a list of available
69+
properties which you can use, check the target you are overriding in the
70+
nbproject/build-impl.xml file.
71+
72+
-->
73+
</project>

0 commit comments

Comments
 (0)