Skip to main content

fonts

7 replies [Last post]
eelliott
Offline
Joined: 2007-05-07

I would like to use specific fonts in an OCAP app. How are fonts indexed and packaged in an OCAP app, available for loading with the Font(String, int, int) constructor?

Is there a section of the OCAP spec that describes how to work with more than the default font?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pmodem
Offline
Joined: 2008-12-17

You can use ttf fonts directly.
Follow the above instructions from 'eelliott on' 2/2/10

swens
Offline
Joined: 2010-04-19

ya i am able to get the required FONT using ocap RI but if i launch the same application on my hardware its giving font exception.

anujverma000
Offline
Joined: 2007-07-30

i dont know the way how to convert ttf to pfr.
BitStream has designed this font format..
You can go and have these font..
Ocap RI has two .pfr font with it.
try using.
dont forget to specify in the properties with application.

swens
Offline
Joined: 2010-04-19

ya...I have tried with those .pfr fonts which are present in OCAP RI, its working fine with my hardware....but I need ttf fonts not the .pfr fonts, the ttf fonts are not working fine with my hardware, its throwing fontformatt exception.

eelliott
Offline
Joined: 2007-05-07

answering my own question...

One way to employ custom fonts in an OCAP application is to use FontFactory with the font files and the ocap.fontindex file placed in the root directory of the app, where the FontFactory() default constructor can find them. Then, you can create Font instances with FontFactory.createFont(String, int, int).

anujverma000
Offline
Joined: 2007-07-30

We can use only .pfr fonts in OCAP applications.
try using those.

swens
Offline
Joined: 2010-04-19

can u plz let me know can we use ttf fonts directly or it needs to be converted to pfr format and then use it???