https://github.com/intrigus/gdx-freetype-gwt
Freetype for gwt
https://github.com/intrigus/gdx-freetype-gwt
freetype gwt libgdx
Last synced: 5 months ago
JSON representation
Freetype for gwt
- Host: GitHub
- URL: https://github.com/intrigus/gdx-freetype-gwt
- Owner: intrigus
- License: apache-2.0
- Created: 2015-11-02T18:37:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T00:01:47.000Z (over 4 years ago)
- Last Synced: 2025-10-21T09:55:08.657Z (8 months ago)
- Topics: freetype, gwt, libgdx
- Language: Java
- Homepage:
- Size: 760 KB
- Stars: 47
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gdx-freetype-gwt
You ever wanted to use freetype on the web version of your game but couldn't? Now you can!
# Versions
You have to use a matching libGDX and gdx-freetype-gwt version.
See this table for compatibility.
| libGDX | gdx-freetype-gwt | Note |
|:--------:|:----------------:|:------:|
| 1.9.11-SNAPSHOT | 1.9.11-SNAPSHOT | |
| 1.9.10 | 1.9.10.1 | Fixes https://github.com/intrigus/gdx-freetype-gwt/issues/9 |
| 1.9.10 | 1.9.10 | Don't use. Use 1.9.10.1 instead |
# How-To
1. Go to your `GdxDefinition.gwt.xml` in your `html` subproject
Add
``
after
``
2. Change your `build.gradle` of the `html` subproject
Add
````
implementation "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:$version"
implementation "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:$version:sources"
````
3. Modify your `HtmlLauncher.java` (or if it's not named so, modify the class in your `html` project that extends `GwtApplication`)
Add
````java
@Override
public void onModuleLoad () {
FreetypeInjector.inject(new OnCompletion() {
public void run () {
// Replace HtmlLauncher with the class name
// If your class is called FooBar.java than the line should be FooBar.super.onModuleLoad();
HtmlLauncher.super.onModuleLoad();
}
});
}
````
4. Profit and Enjoy
# Note
If gradle fails to resolve the dependency this most likely means that there no matching gdx-freetype-gwt version has been published.
You should try previous versions since freetype is generally updated rarely.
In any case open an issue.