jME-TrueTypeFont Rendering Library

Can I upload Sfntly to jCenter? Obviously it’s not my project.

seems there is one in maven central… not sure if it’s the same lib though…
http://search.maven.org/#search|ga|1|a%3A"sfntly"

That might work so long as whoever’s maintaining that compiles it with java 1.7 otherwise Android will have trouble with it.

Considering my pom.xml I see that it stores the dependencies, currently I have two dependencies on my local drive, sfntly.jar and android.jar. I could use the sfntly you pointed out, but what about android.jar? That’s the android platform downloaded from the Android SDK. It’s just needed for compiling the library, but I don’t think it’s on jCenter or mavenCentral.

1 Like

I think you can do anything you want until it is prohibited in a license.

1 Like

Yeah, but it’s still bad form if there are alternatives. You really should avoid publishing someone else’s library to jcenter or maven central if you can.

How do other libraries handle it?

That’s usually what I check.

Well I guess I’m lost for now. I uploaded jme-ttf.2.0.0.jar, jme-ttf.2.0.0-sources.jar, jme-ttf.2.0.0-javadoc.jar and pom.xml, but when I click ‘Add to jCenter’ it just says I need to upload a pom.xml file.

Hey Tryder …

Wow … this library is really cool. Great work ! The documentation on your web page is really well set out too, and very clear. You have put a lot of work into that.

Might I make a suggestion? Maybe add the library to jME Contributions, and put the documentation on the web page into the jME Wiki. I checked the Wiki and it isn’t there. I couldn’t find the contributions repo to see if it is there or not. (Maybe someone could point out where to find it now … )

I am certain a lot of people will use this. I have some ideas in mind to update some projects of mine that use text meshes from Blender that have been imported into jME. With this lib, I can do that in code and change the text as needed. Very cool indeed.

And as an aside, I enjoyed reading some of your blog entries too.

2 Likes

Thank you, I certainly appreciate the compliment.

Sure I will read up on how to go about doing this.

:smirk: Heh, well, I’ll just say my thoughts aren’t exactly popular in my neck of the woods. I pretty much have to keep myself in check, liable to get stoned if I open up too much. Every now and again I let myself get too comfortable with someone or a situation and a little too much slips out. Even on my web-site I can’t say I don’t hold more than a few things back.

1 Like

@nehon & @pspeed After speaking with customer support I finally got jME-TTF up on jCenter.

groupID: com.atr
artifactID: jme-ttf
version: 2.0.0

P.S. My err was that pom.xml should’ve been named jme-ttf-2.0.0.pom and the file path shold’ve been com/atr/jme-ttf/2.0.0 rather than just com/atr. All good now :slight_smile:

5 Likes

Cool. Thanks for not giving up :wink:

1 Like

Note: build tools like gradle or maven would have taken care of all of that automatically with their upload tasks.

Edit: but glad you got it worked out.

1 Like

Quick Question:

Can the text mesh be extruded to form a 3D text?

1 Like

Currently no, but that is something I’ve thought about adding in at some point.

3 Likes

I am having trouble using this font library as there is a missing method in this file:
com.atr.jme.font.shape.TrueTypeText.java
The missing method is supposed to be called clearCollisionData();
I have imported the google jar library (sfntly.jar)
Are there anyother libraries I missed, or is this a bug.
Here is the error:

java.lang.NoSuchMethodError: com.atr.jme.font.shape.TrueTypeText$BMPMesh.clearCollisionData()V
	at com.atr.jme.font.shape.TrueTypeText$BMPMesh.updateMesh(TrueTypeText.java:251)
	at com.atr.jme.font.shape.TrueTypeText$BMPMesh.<init>(TrueTypeText.java:67)
	at com.atr.jme.font.shape.TrueTypeText$BMPMesh.<init>(TrueTypeText.java:65)
	at com.atr.jme.font.shape.TrueTypeText.<init>(TrueTypeText.java:46)
	at com.atr.jme.font.TrueTypeBMP.getText(TrueTypeBMP.java:157)
	at com.atr.jme.font.TrueTypeBMP.getText(TrueTypeBMP.java:129)
	at com.atr.jme.font.TrueTypeBMP.getText(TrueTypeBMP.java:57)
	at com.atr.jme.font.TrueTypeFont.getText(TrueTypeFont.java:231)
	at com.atr.jme.font.TrueTypeFont.getText(TrueTypeFont.java:196)```

and here is to line where the error was generated from: ```  TrueTypeNode trueNode = ttf.getText("TEXT HERE!",0,ColorRGBA.White);```

What version of jME are you using? clearCollisionData() is a method in jME’s Mesh class.

I am using JME 3.0 Stable. I didn’t realise that clearCollisionData() was part of the JME library. However, when looking I couldn’t find an import for this.

Do I even need to use the mesh library because I was using the Bitmap text method.

The class used to display bitmap text extends Mesh so yes. Everything in the scene graph is a mesh including text.

For bitmap text the mesh is just a series of quads used to display the character texture. Mesh text is named so because the mesh itself is used to form the outline of each character.

Ok, but how would I go about importing the mesh, because i searched throught the com.jme3 packages and I found com.jme3.scene.mesh but that doesnt seem to solve the problem. Do i need to extend the mesh into my code aswell?

It looks like the clearCollisionData() method wasn’t added until jME3.1 so I would download the lastest 3.1 release of jME and use that instead.