Font.properties files

Hello!
Do you know at what point does the Java Runtime load font.properties file and how it selects the one to load?
I am struggling with displaying cyrillic characters in AWT controls.
I have a code like this inside the applet's init() method:
=================================================
Locale rus = new Locale("ru", "RU");
this.setLocale(rus);
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, rus);
String s = df.format(new Date());
displayString = new Label();
displayString.setLocale(rus);
add(displayString);
displayString.setText(s);
===========================================================
The output is supposed to be "12 ������, 2005�."
Instead, every cyrillic character is replaced with a square box.
I think the JRE is just loading the wrong font.properties file somehow...
BTW, my OS is an english version of Windows XP.
I'll greatly appreciate any suggestions.
Thanks for your time.

Which one is loaded is based on the locale of the JVM at start-up time. The locale is taken from the system locale, which on Windows is based on the region/language currently selected. You can override this using java intergreter's options, such as, in your case:
java -Duser.language=ru -Duser.region=RU yourgrogramUsing the above settings, font.properties.ru will be used. Cyrillic characters will then be displayed properly if appropriate fonts are installed. This, however, may not work with AWT components. To be sure, use Swing -- they are better designed for rendering Unicode characters.

Similar Messages

  • Packaging font.properties file.

    Hello All,
    I am developing a cross-platform application and I wat the Java runtime to use my own font.properties file. How can I specify that file using -D switch?
    (for example, for logging i write, java -Djava.util.logging.config.file=logging.properties MyApp so, is there a similar option for font.properties?)
    Thanks in advance,
    Ghaznavi

    Any body please help!
    Ghaznavi

  • Which font.properties file to use- please help

    I am working on an application for accepting hindi text as input.Please help me in following matter-
    1. I have several font.properties file on my application server machine. Also some jre have font.propeties file. Which file should I change so that my forms 6i deployed on this application server can accept hindi font insatlled on application server machine.
    2. If I need to change my Jinititor , where should i make changes.
    Please help

    you have asked so many questions about hindi text, etc... and nobody could help you. Please contact the support and open an ITAR at metalink.oracle.com. They should help you.

  • Font.properties help needed

    I have a USA client with several Reports that use fonts “OCR A Extended” and “Wingdings 3”. The OCR A Extended font is being used for a scanline by OCR scanners to call up invoices. They MUST use that font or the scanners don’t work. They are also using specific angled arrows from the Wingdings 3 font set. I can’t get either one to work in the Reports.
    I have mapped both OCR A Extended and Wingdings 3 to dialoginput in the registry.dat file.
    Getting the correct values into the font.properties file is the part that I’m having problems with. I’m trying to do this by following other examples I’ve seen, but I’m not hitting the correct combination.
    I have added:
    dialoginput.3=OCR A Extended,ANSI_CHARSET
    dialoginput.4=Wingdings 3,DEFAULT_CHARSET
    1) Do I need to add a “NEED_COVERTED” to either one of those lines? I’m guessing no because this is plain Windows US/English, nothing foreign.
    2) Do I have the proper _CHARSET for both of those lines?
    I have also added:
    filename.Wingdings_3=WINGDNG3.TTF
    filename.OCR_A_Extended=OCRAEXT.TTF
    3) Do I need to do that or should I take it out?
    From what I’ve read, if I use a NEED_COVERTED then I also need a:
    fontcharset.dialoginput.3=…..
    fontcharset.dialoginput.4=…..
    But I have NOOO clue what needs to follow the “=” sign.
    It is mission critical that I get both of these working, especially the OCR A Extended font. I thank you in advance!

    Hello,
    This Forum is about "Oracle Reports"
    Your question seems to be related to "Oracle Forms" :
    For the "Oracle Forms" Forum, go to :
    Forms
    Regards

  • Font.properties to set custom in-house fonts

    Hi all,
    Currently attempting to get Forms Server to display a custom fonts called TH Sans Serif which is MS Sans Serif modified for our special needs. We need to show a whole array of fonts which caters for Rumanian, Hungarian, Polish, Slovak, Western European fonts amongst others. Problem is that the font.properties file (loaded with Jinitiator to be found under %Jinitiator_Home%\lib) maps 4 fonts (Monospaced, SansSerif, Serif, Dialog) that are used in the registry.dat file. Apparently reading from newsgroups it is possible to set one of these four mappings to your own custom font. Haven't unfortunately found a success case yet. Can anyone help.
    Thanks in advance.

    Please use the Forms forum for best response.
    Ashesh Parekh
    Oracle9iAS Product Management

  • Loading "font.properties" from different location

    Is it possible to tell the JVM to load "font.properties" files from a different location instead of "$JAVA_HOME/jre/lib"?
    Thanks in advance.
    Regards.

    Is it possible to tell the JVM to load
    "font.properties" files from a different location
    instead of "$JAVA_HOME/jre/lib"?
    Thanks in advance.
    Regards.I am also looking for a solution for this, since it's not a good idea to modify the JRE itself.
    Could anybody help? Thanks.

  • Font.properties

    Is the jre using font.properties at all when displaying characters in the GUI? I removed all font.properties* files from my jre/lib directory and I am still able to display English characters and double-byte Korean characters. Certain fonts are not working for the Korean, but this all seems independent of the font.properties files. I'm using jdk 1.3.1_06.
    Bleu

    I have i18n.jar in my classpath and LocaleElements_ko.class is in it. The only font that works for me in Korean is Dialog with BOLD style. What relationship does font.properties have to i18n.jar? I guess the jre is getting the appropriate Font based on the Locale out of the i18n.jar? What do i need to do to get additional fonts (really I just want Dialog with PLAIN style) to work in Korean?
    thanks,
    Bleu

  • Using font.properties to map custom in-house true type fonts

    Hi all,
    I'm currently attempting to get Forms Server to display a custom fonts called TH Sans Serif which is MS Sans Serif modified for our special needs. We need to show a whole array of fonts which caters for Rumanian, Hungarian, Polish, Slovak, Western European fonts amongst others. Problem is that the font.properties file (loaded with Jinitiator to be found under %Jinitiator_Home%\lib) maps 4 fonts (Monospaced, SansSerif, Serif, Dialog) that are used in the registry.dat file. Apparently reading from newsgroups it is possible to set one of these four mappings to your own custom font. Haven't unfortunately found a success case yet. Can anyone help.
    Any suggested websites or newsgroups dealing with this would be greatly appreciated.
    Thanks in advance.
    Holger

    Please use the Forms forum for best response.
    Ashesh Parekh
    Oracle9iAS Product Management

  • Text editor used to type the contents of the properties file

    ******To all those (expect iainsinclair) who view this message - Sorry for using this forum for my personal contacts **********
    Hi iainsinclair
    Thanx for explaining ur experience to me for my previous posted topic . U did mentioned a text editor called NETBEANS PROPERTY TEXT EDITOR .
    * Can u please explain more about this editor . Is this editor specific to some encodings ....
    * U said that as u enter the Japanese characters in ur keyboard the editor saves the characters in the unicode format. Are the characters displayed in their glyphs or as \u????.
    * Can u give me a list of languages f or which this text editor can be used . Bcoz u had suggested that it can be used for chinese also .
    * I need more info about a Japanese Computer and keyboard. I think we both are in the same level in this topic I18N . Iam working for I18N project in my company. This is my official mail ID- [email protected] .Can u send me ur mail Id so that we make sure that this forum members are not disturbed by our discussion .

    Hi, I'm happy if I can help.
    * Can u please explain more about this editor . Is this editor specific to some encodings ....
    It's the netbeans IDE from www.netbeans.org it's a free integrated development environment for java. It includes many editors, for .java files, .properties files and many others. It is designed to accept text in the non-ascii format and convert it for use in properties files.
    * U said that as u enter the Japanese characters in ur keyboard the editor saves the characters in the unicode format. Are the characters displayed in their glyphs or as \u????.
    They are saved as ascii characters, not glyphs. For example, I entered MSGothic (MSゴシック) in japanese using net beans and it looks like this when I use a normal text editor: MS\u30B4\u30B7\u30C3\u30AF
    * Can u give me a list of languages f or which this text editor can be used . Bcoz u had suggested that it can be used for chinese also .
    It should work for any language that your windows/linux system has support for (need the right fonts for a start). My system is native japanese, so I have all the required japanese fonts installed. If you want to use (for example) Chinese on an English system, you'll have to get the fonts and probably you will need to modify the jre/lib/font.properties file.
    * I need more info about a Japanese Computer and keyboard. I think we both are in the same level in this topic I18N . Iam working for I18N project in my company. This is my official mail ID- [email protected] .Can u send me ur mail Id so that we make sure that this forum members are not disturbed by our discussion .
    I don't think it's disturbing anyone. Forums are all about sharing information, and there is a lack of experience of I18N in the broader comminity, I feel. This isn't a busy forum... ;-)
    Don't forget to look for the article written by John O'Conner called 'Displaying Text' I don't have the URL handy but it was posted on this forum recently. It's required reading.

  • Jdk/jre loads incorrect font.properties

    I am using Solaris8 Multilanguage edition(4/01) free binary licsence on a Ultra 10 workstation, the jdk/jre version is 1.2.2_05a.
    My problem is when I set the language environment to Japanese, the jdk/jre will load font.properties.ja.5.5.1 instead of font.properties.ja, and if I set the language environment to English, the jdk/jre will load the correct one - font.properties, although there is also a font.properties.5.5.1. The 'os.version' system property can be obtained from java program correcttly, it says '5.8'.
    Can anybody tell me what is the mechanism causes this? i have to find out the way to ensure the jdk/jre to load the correct font.properties file, any help appreciated!

    This reply posted by myself to provide addtional information.
    I finally found out the mechanism is:
    The following fact tested when the language environment is set to Japanese.
    If both font.properties.ja and font.properties.ja.5.5.1 exist, the VM first try to use font.properties.ja, but if font.properites.ja contains any font which causes a 'Font specified in font.properties not found' error, the VM abandons font.properties.ja and tries to use font.properties.ja.5.5.1, if font.properties.ja.5.5.1 doesn't cause any error, no error will be output, but if there is still any font cause an error, the error will be printed.
    If only one file exists, it will be used, and any error caused by it will be printed.
    So if font.properties.ja contains any font which causes an error, the result looks like that the VM only loaded font.properties.ja.5.5.1.
    And if the lanuage environment is set to C, only font.properties will be loaded, any error caused by it will be printed. font.properties.5.5.1 will never be used.
    Is this the specification? who knows...
    FYI

  • Why no font.properties.zh_HK?

    In my JRE (1.4.1_06)'s lib directory, there is a font.properties.zh file (for S. Chinese) and a font.properties.zh_TW file (for Taiwan T. Chinese), but no font.properties.zh_HK file (for Hong Kong T. Chinese). Anybody have any idea why?
    Also, does anyone know if it is legal to copy font.properties.zh_TW to font.properties.zh_HK and redistribute it?
    The reason I'm asking: On an English XP box, with the appropriate fonts installed, if I set user.language to zh or zh_TW, the app starts up and displays fine. However, if I use zh_HK I see a bunch of boxes instead of T. Chinese. Once I make the file copy I mentioned above, all is well. Seems odd that file is not included by default.
    Thanks in advance for any insight.
    Jamie

    You probably have problems with both character encoding and font rendering.
    The character encoding part: If you use the same resources for TW and HK, you can't use GBK and Big5 conversions on them. GBK and Big5 are incompatible encodings. Also, GBK is for simplified Chinese, and used in mainland China and in Singapore, but rarely in Hong Kong - it doesn't have all the traditional Chinese characters that are used in Hong Kong.
    What you get from the translator may be encoded in Big5, or it may already be in ISO-8859-1 with Unicode escapes, the only encoding that the Properties class understands. If it's in Big5, use native2ascii to convert it. If it's ISO-8859-1 with Unicode escapes, leave it alone.
    The font rendering part: With Chinese (Taiwan) selected, the font.properties lookup (http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html#loading ) uses the locale zh_TW and the encoding MS950, and finds font.properties.zh_TW. With Chinese (Hong Kong) it uses the locale zh_HK and the encoding MS950, and finds font.properties.zh. The zh file is for simplified Chinese, so you'll be able to render some, but not all of the Chinese characters used in Hong Kong. If you have HKSCS installed, the lookup uses zh_HK and MS950_HKSCS, and finds font.properties.MS950_HKSCS, which uses fonts appropriate for Hong Kong.
    Your questions:
    1. I don't know why the warnings are so strong. The only reason given is that "the package may affect private use characters", which could be a serious problem for somebody who seriously uses Chinese, but won't impact your occasional testing. You may want to check with Microsoft.
    2. That's what the support in JRE 1.4.1 and up is designed for. The only problem is that the font.properties files aren't consistently named - some are named using locale IDs, others using encoding names, with the results described above.
    3. To render Chinese characters in non-Chinese environments, you should upgrade to JRE 5.0 - its multilingual font rendering support uses fonts for all writing systems that it can find on the OS (http://java.sun.com/j2se/1.5.0/docs/guide/intl/enhancements.html#desktop ). With JRE 1.4.1 or 1.4.2, you'd have to look for Chinese fonts yourself and request them using their physical font names. For more information, see http://java.sun.com/j2se/corejava/intl/reference/faqs/index.html#desktop-rendering.
    4. JRE 1.4.1 is no longer supported, so info is hard to find. The documentation for JRE 1.4.2 mentions "HKSCS" at http://java.sun.com/j2se/1.4.2/docs/guide/intl/locale.doc.html#jfc. I admit, that's not too clear. A bit more helpful is the name of the font.properties.MS950_HKSCS file. Finally, this reply is info from Sun.
    Norbert

  • HELP TO CHANGE FONT.PROPERTIES

    Hi, I've been triying to display some characters that are excluded from the font,properties files. What I do is change the exclusion range as follows:
    i.e.if i want to include characters from u2700 to u27ff i change the next line
    exclusion.dialog.0=0100-20ab,20ad-ffff
    and I use:
    exclusion.dialog.0=0100-20ab,20ad-26ff,2800-ffff
    Is that correct? because it does not work.

    nm. Got it

  • Problem in writing Hindi Font in properties file at run time.!

    hi,
    We are using Language translator for our project.
    We are able to convert the language in hindi and chinese language.
    Im also creating properties file respective to each page in hindi,english and chinese language.
    At run time while CREATING properties file shows the english font appropriate but while
    in hindi it shows problem at run time .
    after WRITING at run time the hindi properties file contains lots on question mark(????????????) intead of hindi font words.
    does any advise me the solution to this problem.?
    Thankx in advance.!
    Johnita

    Hi suraya,
    Since the issue regards MVC and website deployment. I suggestion you post the question in the ASP.NET forums at
    http://forums.asp.net/. It is appropriate and more experts will assist you.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can i write properties file for Hindi font

    Hi All,
    i'm using jdev 11.1.1.5.0
    in my use case i have worked on internationalization where i want to use hindi font
    like this link -
    Majid Hussain: Internationalization of ADF 11.1.1.3 Applications
    as in above post majid used german language and write properties file for german language(which is using english character).
    but my problem is that i want to use hindi language
    so how can i write propery file which support hindi font.
    Manish

    Hi Manish,
    We also had same requirement where we need to show indian local language(Hindi ,Bengali and many more ).
    We had implemented following approach and perhaps it will helpful for you.
    1-First we changed the encoding value in jdeveloper.
       go to jdeveloper --> tools --->preference-->encoding , select to UTF8
    2-We used to get the properties and it's translated value from business and then we were manually put these pair into related resource bundle.
    And using this we were able to implemented multilanguage support.
    Thanks
    Prateek

  • How do you access a specific TrueType font in a Font Collection File (TTC)

    I am trying to create a Font as follows:
    InputStream is = new FileInputStream("myname.ttc");
    Font font = Font.createFont(Font.TRUETYPE_FONT,is);
    This works fine but I need to get a specific font from the collection.
    How does one go about creating a font from a particular font within
    a collection?
    I need to access the font file directly. I can't use the
    properties file to install the font collection first.
    Any help is appreciated!
    Thanks

    in fcpx 10.0.6, if you have a range selection, the export will be only that segment.
    Hold down the R key and click-drag a range selection, or use the playhead to mark In ('i' key) and Out ('o' key) points.
    Select Share > Export File
    In the dialog, select Settings
    For Format: Audio Only
    Audio File Format: I recommend AIFF, CAF or WAVE (depending on your target audio editor.) [AAC, AC3, and MP3 are "delivery" formats, not editing formats.]
    then hit Next and save it.
    I recommend setting a marker at the in point so you can easily line up the edited audio when you re-import it.

Maybe you are looking for

  • When trying to download I get error message unable to initialize installer GUI

    I was having a problem with my email in Firefox so I uninstalled it and tried to download it again, hoping a newer version might fix the email problems I was having. When attempting to download Firefox from the website, I get this installer error "Un

  • Best Settings for Audigy 2 ZS Recording Out to S-VHS or DVD Recor

    I?m recording some very machine intensi've video & sound to outboard devices. I'm using these outboard devices so that the recording process itself does not impact the demonstration performance. Concerning the sound out, I?m using the line & 2 out of

  • Adding a "header" (or skin?) to files

    Hello, I would like to have a common header on all of my slides- a company logo. Can anyone help me learn how to do this? Lindsay

  • Set text of jtextArea to a text file

    I have tried everything in trying to let the user select a text file using jfilechooser and then set the text of a jtextArea as the text file. Nothing has worked so far, so all I have right here is the basic functionality of choosing the file. If som

  • Migration assistant/Time Capsule-TM/ Superduper transfer

    What would be easier: I am getting a new replacement iMac from Apple after I send back the iMac being replaced. Presently I use Superduper (back up software) to back up my system from my present imac to a FW 800 external hard drive. I also have a new