Jump to content
JasperReports Library 7.0 is now available ×

The venerable Embedded Font issue


2005 IR Help

Recommended Posts

By: Mykel Alvis - evilarchitect

The venerable Embedded Font issue

2004-09-08 09:12

I'm trying to use a true-type font on a report. Ordinarily I'd think this was a no-brainer, based on the information in the JRUG. However, it doesn't seem to be that simple.

 

I'm using JasperAssistant to create my reports in Eclipse. I've installed the font (ocran.ttf) on the Win2K system as a system font, and I've also installed it as a font in the jre/lib/font directory.

 

I defined a report font called OCR that is the "OCR-A BT" font of size 18. I use that report font as the font for a text field that contains a field value.

 

I'm using the applet viewer to show the user the report. The application runs under JBoss/Tomcat and the ocran.ttf font is available to the web app as a resource in WEB-INF/classes.

 

In JasperAssistant, the font is displayed as the default unavailable character (the rectangle). When I run the report, that's also the font it's displayed in on the report screen (i.e. if it's a 4 digit number, it's four rectangles).

 

I've written a small test program that loads the font based on it's family name, so the java.awt.Font class is capable of being instantiated by the JVM. I have no idea if this matters.

 

I've looked over both forums as well as the JasperAssistant forum. I've also checked the Sun site regarding Physical Fonts.

 

I don't know if the font is a Unicode font or how to determine that. It's version is apparently 1.56 dating from 02/16/1993.

 

I'm currently at a loss as to where to look next. The OCR tool I'm using works best when I scan characters printed with the OCR font (no curvy lines) and it needs to be more than 99.5% accurate. Suggestions regarding other locations to acquire an OCR-type TTF that IS unicode, how to make java see the OCR font I do have, what else I can test, or any other solutions are welcome.

 

 

 

 

By: Peter Severin - peter_p_s

RE: The venerable Embedded Font issue

2004-09-08 09:35

Let me get this straight. Were the font recognized correctly while using the applet viewer ? Or is it something related strictly to JasperAssistant ?

 

Thank you,

 

Peter Severin

- JasperAssistant Team.

 

 

 

 

By: Mykel Alvis - evilarchitect

RE: The venerable Embedded Font issue

2004-09-08 09:39

Nothing specific to JasperAssistant. However, I get the feeling that if the font were displaying in JA correctly it would probably display correctly in the applet viewer as well.

 

As I said, I suck at font-related issues. In fact, I suck at almost all front-end issues. I'm almost exclusively a middleware/back-end architect and I'm doing reporting for this project because that's what I was tasked with doing. I'm actually hoping someone will say "Do thing X, stupid", thing X will be something I've mistakenly not done, and all will be well.

 

But no, the fonts aren't working anywhere except for....the rest of the system (Word, Excel, email, etC).

 

 

 

 

By: Peter Severin - peter_p_s

RE: The venerable Embedded Font issue

2004-09-08 11:44

I think this has something to do with the ocran.ttf, but I cannot say exactly what. I've performed several tests and everything works as expexcted with other fonts. But when I have tried the ocran.ttf (downloaded after a google search) the result is the same as yours. Perhaps your version of non-unicode font is correct but I am not a font expert to give you a final word on this.

 

Best regards,

 

Peter Severin

- JasperAssistant Team.

 

 

 

 

By: Mykel Alvis - evilarchitect

RE: The venerable Embedded Font issue

2004-09-08 12:20

Thanks, Peter!

 

Anyone else got any idea where to d/l and/or buy an OCR-friendly font or how to make a non-unicode font into a unicode font?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...