Font problem in Applet (Urgent)

Hi all,
i m using a font to render the japneese character in an applet.and i m doing some text manipulations with that.and the font is TrueType font.Now if the client has that font file it renders with the japneese text.it is fine.but when the client system doesnt have the font file installed it still gives the font object(i think it is default font object supported by the JRE) which is not of TrueType.so my text manipulations behaving wrongly which i dont want to happen.If i able to find the font object returned is of TrueType or not then i can resolve this issue.
So anybody can help me,is there any method (or anyother way to achieve it) to find whether the created font object is of TrueType or not.i have seen the Font class and its related api ,i couldnt found such method.SO can anyone help in this regard.it will be greatfull.
thanx
prakash

However, if you upload the font onto your server, there is a way
that you can use that font file, rather than relying on your user's fonts. but can any one tell me about the way to use the font file from the server , rather than relaying on the user's fonts??
Rana.

Similar Messages

  • FONT problems with UNICODE - URGENT

    i'm trying to present text in different languages, like english, greek or cyrillic and so on. i want to work with the Arial Unicode MS font, that is installed on my system and which DOES appear in the getAvailableFonts() list!!!
    But when i try to display a greek text i see not all glyphs correctly. What have i to do??
    Have I still to set up my font.properties file and if so how can i manage this
    thanx a lot

    To me, it looks as if your problem is that you're only calling setFont on "this".
    That's only going to set it for the top level frame, and doesn't always do it for every individual component. The easy way to get around this is to go berserk with the setFont call. Set it on anything (heck, set it on your dog if it makes you feel any better)! ;D
    The slightly harder but smarter way to do this is to write a recursive function that drills down your component list.
    public void setFontRecursively(Font myFont, Component comp) {
       comp.setFont(myFont);
       if (comp instanceof Container) {
          Component[] childComps = ((Container)comp).getComponents();
          if (childComps != null) {
             for (int i=0; i < childComps.length; i++) {
                setFontRecursively(myFont, childComps);
    That should basically cover anything bar popup menus and drop-down submenus. You have to recall this as they appear, or they don't get the font straight off.
    Hope that helps!
    Martin Hughes

  • JRE 1.5.0_03 Problem For Applet (Urgent)

    Hi All;
    I am ajava developer and developing enterprise applications. My problem is to learn how to run unsigned applet using Jre 1.5.0_03 in Internet Explorer. I want to do this because to avoid signing the class files after every changes. When I do some changes in class files i will export this one class files to the folder in my disk and connect the application from the web browser and run unsigned content properly.Is there a way without packagin and signing the whole code to do this operation in jre on internet explorer?
    Thanks
    ozalp

    You should be able to run unsigned applets during development with the appletviewer, as it does very little security checking.
    Alternatively, you can add the appropriate permissions to your development client machine that will allow the applet to run. Add something like one of these to the \<jre>\lib\security\java.policy file.
    // Grant all applets the AllPermission property. This is dangerous and is only provided as an example.
    grant {
    permission java.security.AllPermission;
    // Grant permissions to a particular URL (e.g., the URL containing your applet).
    grant codeBase "http://your.url.here" {
    permission java.security.AllPermission;
    }Java.policy documentation is here: http://java.sun.com/j2se/1.5.0/docs/guide/security/PolicyFiles.html

  • Japanese text display problems in applet using plugin

    Hi,
    We've been beating our heads against the wall on this one for quite some time, so any help would be greatly appreciated.
    Our product uses a third party applet (Kavachart from Visual Engineering) to display graphical statistics from our database. We are currently localizing our product to support english and japanese. With Japanese enabled, all pages use euc-jp encoding. The problem we are running into is in the display of japanese text inside this applet in IE 5 and NS 4.7x when using the java plugin (1.3 or 1.4). If the default jre of the browsers are used, the text in the applet renders fine.
    On a suggestion from the supprot folks at Visual Engineering, I modified our code to set the defaultFont parameter on the applet to "serif, 14, 1". With this set, the text in the applet renders ok in IE, but NS on windows and unix is still broken. Given that we are doing all these tests on machines running a native japanese OS, it's not even clear to me why setting the defaultFont should even be required, but at this point, I'll take anything :-)
    Has anyone else run into this and either solved it or proven that a solution is not feasible? I'm at my wits end here....
    Thanks in advance,
    Mark Evangelisto
    Synchronicity Inc.

    If you are using different java plugin, you need to install the international version of the JRE; otherwise, some characters may not be able to display correctly since some of the properties files are missing.
    As for Visual Engineering's suggestion. I don't know why they tell you to set the default font on the applet because it may cause the browser to use the font specified. Your applet works on IE because it will try to use the best font to match the web page's content. For NS anything less then 6.0 (technology based on Mozilla), they never display web page correctly especially if you did what VE suggest.
    If you are running the applet on the native langauge OS with the international version of the JRE installed, the applet should display correctly without setting the default font. If it is not the native langauge OS, first you need to install the international version of the JRE and have the fonts that are able to display the language the applet use.

  • Problem calling applet method using IE

    I've searched through the forum and can't seem to find anything that can help me fix this. I'm trying to call an applet's method using Javascript. This is working fine under Netscape, but not IE. Everything I've read seems to indicate that I'm doing this right, but I'm getting "Object doesn't support this property or method" when I try to call the applet method from IE.
    In this example method, I'm trying to call the applet's countChars method, which should return the length of the string you pass into it. Works under Netscape 6.2, but not IE 6.0
    Here's my applet code:
    import java.lang.String;
    public class test extends java.applet.Applet {
    public static int countChars(String s) {
    return s.length();
    And my HTML
    <HTML>
    <HEAD>
    <script language="Javascript">
    function refreshApplet()
    /*     i = document.forms.myForm.TestApplet.countChars();
         document.forms.myForm.output.value=i; */
         document.forms.myForm.output.value=document.applets["TestApplet"].countChars(document.forms.myForm.input.value);
    </script>
    </HEAD>
    <BODY>
    <APPLET CODE = "test.class" WIDTH = 400 HEIGHT = 400 ALIGN = middle NAME = "TestApplet" scriptable="true">
    </APPLET>
    <br>
    <form name="myForm">
    <input type="text" name="input">
    <input type="button" value="click me" onClick="refreshApplet();">
    <hr>
    <input type="text" name="output">
    </form>
    </BODY>
    </HTML>
    Thanks in advance!
    Craig Drabik
    Sr. Programmer/Analyst
    University at Buffalo

    I have very similar problem, my applet works OK using Netscape (6.2 and 7.0), but with IE 6.0 It only works with windows XP;
    The reported error is "Object doesn't support this property or method"
    Can someone please help me to solve this problem.
    Cheers
    Horus
    This is my code:
    - I call the applet using javaScript and input the method setData with two strings.
    function graphic()
         var dataZenith;
         var dataManual;
         initVariables();
         dataZenith = graphicZENith(); //Call other Javascript functions
         dataManual = graphicManual(); //Call other Javascript functions
         document.AppletOne.setData(dataZenith,dataManual);
    I run the applet with this HTML code:
    <applet NAME="AppletOne" code="Appl.class" width="450" height="450"
    MAYSCRIPT></applet>
    //Applet code/////////////
    import java.awt.*;
    import java.awt.geom.*;
    import java.applet.*;
    import java.util.*;
    public class Appl extends Applet {
         private int [] myArray1 = new int [156];     
         private int [] myArray2 = new int [156];
         private boolean flag = false;
         // maxDataYAxesNumber es usado para dividir el eje de las Y
    public void init()
              setFont(new Font("SansSerif", Font.BOLD, 12));
              setBackground (Color.white);
              setSize(getSize());     
    // Get data and put in an array
    public void setData(String data1, String data2)
              final String DELIMITER = ",";
              final StringTokenizer theTokens1 =
                   new StringTokenizer(data1, DELIMITER);     
              final StringTokenizer theTokens2 =
                   new StringTokenizer(data2, DELIMITER);
              try
                        String dataX = data1;
                        for (int i = 0; i < 156; i++)
                        myArray1[i] = Integer.parseInt(theTokens1.nextToken().trim());
                        myArray2[i] = Integer.parseInt(theTokens2.nextToken().trim());
              catch (NumberFormatException e) {};
              flag = true; //I get the data OK
              repaint();
    public void paint (Graphics g){
    Graphics2D g2d = (Graphics2D)g;
    setData(data1, data2) ;
    if (flag == true)
                   //Call other functions to process the graphic
    else g2d.drawString(" Sorry I can get Data", 100,80);          

  • How can get & use java true type fonts in my applets

    Hi
    I could get the System fonts in my Applet by making use of Toolkit.getFontList()
    I have used getGraphicsEnvironment to get fonts but my browser doesn't support it.I get ClassNotFoundException.
    How can I get & make use True Type Fonts in my Java Applet.
    any body knows reply immediate pls
    Siva

    similar problem:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=164516
    sorry, thats all i know.
    tobias

  • Pages 08 fonts- problems with Arial, Times New Roman - how do I repair them?

    Pages 08 fonts- problems with Arial, Times New Roman - how do I repair them?
    Using 10.6.8 on MacBook Pro
    Mikeaaa

    I am running Snow Leopard. Transferring the same texts to TextEdit has no problems, so this is a Pages problem, I think.  Corruption of Times New Roman and Arial fonts, I suspect, but where? and what do I do about it? I just need to be pointed to a source of advice, I think.
    Thanks
    Mikeaaa

  • Glitches in address fill-ins with nicknames; default font problem; plus other glitches in Thunderbird 31.3.0 and 31.4.0; can I roll back to an earlier version?

    I am unhappy with the recent upgrade to Thunderbird 31.3.0 and now 31.4.0. My bottom line question is whether I can roll back to the previous version, which was working well for me.
    The problems I have encountered include:
    1. I used to be able to enter a single letter in many cases in the address field, and the autocomplete would fill in the entry that I always use with that single letter. That function has been lost, as has auto fill-in based on the nicknames I have entered in my Address Book. I see there is another thread on this problem (https://support.mozilla.org/en-US/questions/1036962), but no satisfactory answer so far. Entering a single letter now pulls up completely unrelated address entries that may not even have that letter as part of the name, address or nickname for that unrelated address. I have created new nicknames to try to adapt to this problem, but even these new nicknames no longer work with the 31.4.0 upgrade yesterday, forcing me to create yet more complex and hard-to-remember nicknames to pull up my frequent addressees. This is all very frustrating to me, as I depend on speed and ease when creating messages.
    2. Also, I used to be able to enter a single letter in the address field and then use the mouse to click on the "To:" symbol to the left of the next address line to change the next entry to "Cc:"; doing so would then cause the complete address to fill in in the "To:" address field, and make the next field ready for an entry. That no longer works. If I use that technique, the shortcut that I entered in the first field gets included along with the address (if I'm lucky enough to have the address itself selected now, given the problems I've mentioned above). I now have to press "Enter" in order to get the address in the first field to "take" correctly, and then have to click on the "To:" symbol for the next line as a separate action. Just another inconvenience with the new version.
    3. While still on the subject of addresses, personally I see no reason why the address and subject fields should now be colored blue by default rather than appearing as blank, white fields. I far prefer the old look. And I suspect that changing from the blue color to a nice, clean, white field takes time and computer resources that slow things down.
    4. The default font (Times in my case) no longer "takes" when replying to or forwarding messages. I've checked Tools/Options/Composition, and Times is still shown as my default font. However, when I start to type (in a reply with the original message quoted or in a forwarded message), the result is "Variable Width". In order to get Times, I need to highlight the block of text after typing, including the lead-in to the quoted message or the header of the forwarded message, and select "Times" when "(mixed)" shows up. This is a big pain; I often forget to do so and end up having to edit the Unsent Message (which I check before sending) as New and correct the font.
    5. A minor problem: I rely on the reminder to attach a message which shows up when an "attachment-related" word is entered in the body of the message. It has been a wonderful feature of Thunderbird that has prevented me on many occasions from sending off messages without the attachments. However, in the new versions, even if I have indeed added the attachment, a pop-up comes up on sending the message saying there has been no attachment and asking if I want to add one. It's easy enough to just click "No", but it's yet one more unnecessary and distracting step that this new version is requiring of the user.
    I'm really sad to see these various changes/glitches. I love Thunderbird and it bothers me deeply to find myself mired in so many new problems that slow down my work. I would be grateful for any suggestions and advice, and, particularly, for any information as whether I can roll back to the version prior to 31.3.0 that was working well for me.

    Thank you, Zenos. I tried rolling back to v31.2.0, since I had not encountered problems prior to December. However, that didn't help. So I followed your valuable suggestion to revert to v24.6; that seems to have done the trick.
    I would like to mark this problem as "Solved" -- the rollback seems to have worked. However, since my original post was a complex mix of things, before I do that, should I post the individual problem sets that I had noted (address fields/nicknames problems -- numbers 1-3; default font problem -- number 4; attachment reminder problem -- number 5) as separate issues which have not been solved?
    Do you know if these various issues are being worked on? I'm glad to have the temporary fix of rolling back to an earlier version, but I'd like to get back on the current update schedule at some point if and when these problems have been corrected.
    Thank you again!

  • 10.6.8 combo & 10.6.7 pdf fonts problem

    Does the 10.6.8 update combo correct the pdf fonts problem that was inherent to 10.6.7?  After a couple days of stress I had to do the lengthy 10.6.7 uninstall process in order to refine my doctoral dissertation.  This has made me gun-shy & fearful of updates.  Is it safe to update now?

    The combo should fix your problem.  As always have a back-up in case you have to revert.
    The Font update came out to fix the problem in 10.6.7
    http://support.apple.com/kb/DL1377
    It should be rolled into the Combo-Update:
    http://support.apple.com/kb/DL1399

  • HT1338 Font Problems with Snow Leopard

    I'm having font problems after updating to Snow Leopard.  It seems to have problems with spacing the fonts properly and reading some fonts properly in Page and Keynote.  Any suggestions of how to fix it?

    Dear Kurt,
    in bigger companies thinks come slow :-)  Actually we are switching from 10.4.11 with Quark 6.52 and FontReserve to 10.6.8 with Adobe CS5 and FontBook.
    And as you may guess we're running directly into the HelveticaNeue problem.
    We cleaned up the system fonts so that only the absolutly needed are in /Sys/Lib/Fonts/ and all other fonts (from MacOS and our own) are in /Lib/Fonts/ where they are in folders for better handling.
    The number of additional fonts were radically stripped down to the REALLY needed (about 70 fonts with their families).
    We removed the protected fonts and replaced Helvetica, HelveticaNeue, Times, Symbol and ZapfDingbats with PS Type1 fonts.
    Our goal was to have no font conflicts to keep our users save. In addition we put fonts in predefinded collections to switch them on/off with an AppleScript that picks the collection name.
    And from here it went fancy: The Apple apps are working fine but external app like Adobe CS5 and MS Office only see the fonts in /Sys/Lib/Fonts/.
    When we put the HelveticaNeue.dfont back (no matter if it's in the system or at ~/Lib/Fonts/) the other apps also get all installed fonts. We found out that this works even if the HelveticaNeue.dfont is deactivated.
    Unfortunately this brings up two problems:
    The HelveticaNeue.dfont can't be put to a font collection without taking the corresponding font from the Type1 font with it, so it's more difficult to handle with the AppleScript (we have to pick the exact single name).
    The second is that if something goes wrong and all fonts are switched to active we have a font conflict and the possibility that the dfont is used in documents.
    I think I have read all (ok, many :-) of your posts about the Helvetica problem in 10.6 as well as your really great document about font handling in OS X.
    But I wasn't able to get it to work.
    Do you have the one big hint for me???
    Thanks and best regards...      Udo

  • I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    If you have a rescue email address on your account then you can use that - follow steps 1 to 5 half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset : http://support.apple.com/kb/HT5699

  • Caching problem in Applets - Java Control Panel

    I have a problem of applets being cached in Java Control Panel. Is there a way in Java to stop caching applets programatically in the Java Control Panel.
    There is one way to stop caching files by unchecking "Keep Temporary Files on my Computer" under Java Control Panel --> General --> Settings page.
    But I want to do this programatically using some Java programming/Java Scripting/some parameter in applet tag.
    Some solutions like setting cache_option = No, cache_archive= jar file name in PARAM tag in applet and classloader_cache="false" have been already tried. But noting is seeming to be working out.
    Can somebody please provide a solution.

    Following is the listener status
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 11-APR-2007 11:51:12
    Uptime 0 days 0 hr. 1 min. 28 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File I:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File I:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jbpsouthcbg)(PORT=1521)))
    Services Summary...
    Service "jbpsouth" has 2 instance(s).
    Instance "jbpsouth", status UNKNOWN, has 2 handler(s) for this service...
    Instance "jbpsouth", status READY, has 2 handler(s) for this service...
    Service "jbpsouth_XPT" has 1 instance(s).
    Instance "jbpsouth", status READY, has 2 handler(s) for this service...
    The command completed successfully

  • PDF and Font Problems 10.6.8

    Ugh.
    MBP13 7,1 (mid 2010) 2.4g C2D 4G Ram
    I use Vectorworks 2011 to produce CAD drawings for customers and the plant. Recently I began having issues with my PDFs of my CAD not being fully distilled - various issues but primarily most dimensions not visible. I have read that PDF issues cropped up beginning with 10.6.7 and that certain PS fonts can be the issue. As well as outdated PDF readers used by my recipients. In a short-sighted fit of frustration I began monkeying with Font Book and Font Caches.
    My maladies are
    1. My PDFs are incomplete
    2. Received MS Office filed open "blank".  Now MS OFFICE 2011 no longer has common Fonts such as Arial and Times Nee Roman.
    Can I fix this or do I need to go back to 10.6.6 and reinstall Office?
    Thanks in advance.
    BTW this forum is surprising difficult to nav on an iPhone.

    MS Office font Problem solved in case anyone else stumbles upon this.
    http://hints.macworld.com/article.php?story=20110810001909244

  • Font problem in Classic

    I posted this over in the Classic forum...but it's rather dead over there and I fear it may not be seen for a while...so here's the problem...
    I'm running Quark 4 in Classic and having trouble with fonts. Though the fonts are on my computer, and in the OS 9 fonts folder, they won't print correctly. If I use the same printer and print from Quark on my old iMac (running OS 9) the fonts print and look fine.
    I read another thread in this forum that mentioned the fonts must be OS 9 fonts (and must not have been run through suitcase or a similar managing program???). So, on the off chance that my husband or I just took OS X fonts and copied into the OS 9 folder, I copied the OS 9 fonts from the iMac (I just grabbed everything in the Frutiger family, as it was one that I had an issue with) and then dumped them into the OS 9 fonts folder on my iBook. I restarted Classic mode in order to make the fonts available to the OS and then printed again. The font still prints all pixeled-looking.
    Can anyone tell me what I'm doing wrong? Do I need to find the original font disc and install them from the disc?
    Any help would be most appreciated!!!!!

    Hi Diane,
    Glad that the tip helped to "solve" the font problem!
    Not sure why you are printing the file info at the bottom of the page. It does sound as if it is a print setting somewhere though. Hopefully someone has a clue for you.
    Again, thanks for the "solved" star and if I can think of something else for you to try I'll post back. Let us know if you figure it out.
    good luck,
    littleshoulders
    edit:
    "In lieu of an answer...I tried changing the paper size to legal and it's not on the last copy I printed."
    Ooops, I misread your reply, and see that by changing the paper size it corrected the issue.
    Message was edited by: littleshoulders

  • Strange system font problem

    Hello,
    I have the following problem for 2 days now:
    http://img154.imageshack.us/img154/1462/bild1.png
    I did not install anything. I tried to delete font caches but it did not help.
    I re-installed the system but that did not change anything. After resetting the PRAM the problem was solved. At least for some hours, but now the problem appeared again.
    When I do a reboot, strange white lines appear over the grey background and the Apple Logo, then the screen turns blue, the cursor consists of white lines too and nothing more happens. After several tries to reboot the Mac is running again, but the font problem still exists.
    First I thought of a graphic card problem, but it seems that this font problem only concerns system prefernces and system applications.
    I have no idea what to do now, so please help me.

    Hi "Apfelkrautsalami"
    Font caching information is stored on a per-user basis in
    /private/var/folders
    I have no idea if it'll help, but you could try this:
    - Open a Terminal and do
    *sudo rm -rf -- /private/var/folders/??*
    - Restart your machine
    (Note 1: The '--' prevents rm to think that folders like '-5' are options)
    (Note 2: The '??' will match any two-letter directory. I didn't want to say '*')

Maybe you are looking for