How to install new fonts using code in java?

Hi,
How to install font in a system using java, provided i know the font file's address. Is there any specific class/method available for this purpose? Copying the file to windows/font directory will work for windows, but I think it wont be generic to all operating system. So is there anyway to install a font using code?
I also want to know how to make the font available only until my application window is open, It must be available to all other external applications like photoshop, word etc., When I close my window it must un-install automatically or be made not available to other applications. Any suggestions? Please do help! Thanks in advance...

I have already tried the above, But the font created using input stream is available only to my application* and is not viewable in photoshop.*. I realize this. Like I said, I know of no method that will register/deregister the font with the system. You'll have to create your own method that takes the operating system into account.
String os = System.getPropery("os.name");
if(os.equals("Windows Vista")) {
}else if(os.equals("Windows XP")) {
}else if(os.equals("Windows NT")) {
}else if(os.equals("Solaris")) {
AIX
Digital Unix
FreeBSD
HP UX
Irix
Linux
Mac OS
Mac OS X
MPE/iX
Netware 4.11
OS/2
Solaris
Windows 2000
Windows 95
Windows 98
Windows NT
Windows Vista
Windows XPYou'll need the standard font directory for each system. I think all the window ones are C:\Windows\Font\ . Each OS probably has its own little quark (like having several font directories or throwing different security exceptions). Undoubtly it's going to require some research and a bit of trial and error. You can probably work some magic with Runtime.exec(...) as well.
The alternative would be to google for some libraries that offer similar functionality, or promt the user for the system's font directory and save the location of the directory in a file somewhere for future use (so the user dosen't have to specify the font directory everytime he/she starts up the application).

Similar Messages

  • Question: how to install new fonts in Premiere on Mac

    Someone, please tell me how to add new fonts in Adobe Premiere!
    I use MacBookPro with OS X Lion.
    As trying to add fonts reffering to the previous discussion like http://forums.adobe.com/message/2379742 ,
    I realized that it was unavailable because I cound not see "Install New Font" in "Window".
    Is there a good way to solve this problem?

    In Mac OS X, double-clicking on a font file (i.e PostScript, Font Suitcase etc.) should launch the Font Book application, that window will have a Install Font button. You may have to Quit PrP and re-open for font to be available.

  • How to install new font file in the device when deploying J2ME application?

    i would like to know how to install the new font file in the device when deploying J2ME application, side-by-side.
    Is that possible to seamlessly install the new font file with the application .jar package.
    thnx.

    No, there is no way of installing new fonts.

  • How do install new fonts from Squijoo templates

    How do I install new fonts from a Template from Squijoo??  Also I am getting an error message when I try to download templates to my laptop that file is not the right kind of file???   My desktop computer has no problem doing this.

    Installing fonts is an operating system issue:
    Google

  • How to install new Fonts

    Hi everybody,
    only with one question, i need to create a new style for my SAPscripts printing and when i create my Paragraph(SE72) and try to use a size for times new roman font, the system send me a message informing that there isn't this font size for <b>times new roman</b>,
    question, somebody knows, how to add new sizes? or fonts to my SAP client!? or what can i do, if i need a specific font size and my SAP doesn't have it.
    Regards and thanks
    Emilio

    Check the below link:
    http://www.sap-basis-abap.com/sapbs043.htm
    Create a new font type with the spool administrator (SPAD)
    When you need some different fonts other than those available in the standard SAP system, you'll have to create those different fonts size manually for the device types that you are using.
    http://www.sapfans.com/forums/viewtopic.php?t=258700&sid=e023b90008c9ee1843c00fc3cf2fcee6
    Prakash.
    COPY SAP STANDARD DEVICE TYPE TO ZXXXX e.g. ZHPLJ4
    SPAD - Spool Administration
    Full administration
    Device Types - ZHPLJ4  (then click Device Types)
    Utilities -> For device type -> Copy device type
    Print Controls - Copy an existing Print Control and change the ControlCharacter sequence
    SE73 - SAPscript Font Maintenance
    Printer fonts - Change
    Double click on the ZXXXX device type
    Create
    Font family   COURIER
    Font size     030
    Characters per inch 21.00
    Print control 1 SFXXX
    Print control 2 SFXXX

  • I knew this once but forgot how to install new fonts.

    I have SCAL( sure cuts a lot) for my Cricut machine( a computerised cutting machine used mainly in crafting.
    I needed some clearer fonts to use with it BUT now I have forgotten how to make them available to my Apps.
    Please can someone refresh my memory.
    I have unzipped them all and loaded the actual new fonts into a folder on my desktop.
    How do I get them from there into an accessible place.?
    Dragging them had no effect.
    Thank you
    ScattyShirley

    *Thank you very much* that worked fine.
    will have to record how to do that in case I forget again.
    Happy Sunday

  • How to instal new fonts in LiveCycle Designer ES 8.2

    Hello All,
    I am using LiveCycle Designer ES - 8.2 . I need a font called "HMGStempelGaramond" to be used in my form. Is it possible to instal the font into LiveCycle ? If yes, then how ?
    Thanks.
    Bibhu.

    Hello Radzmar,
    Thanks for the information. Would you please suggest how to implement it ? If the user who will use this form if has not installed the font in his system will this work ?
    Thanks.
    Bibhu.

  • How do install new fonts into photoshop?

    Trying to add new fonts to my Photoshop. How do I do that?

    That will depend on whether you have windows or a mac. Each OS has its own font folder, that is the location you need to install the fonts. The next time photoshop starts, it should see the new fonts.

  • Trying to install new font using Pages w/my IPad.  The program IDo keeps trying to open it.  Any suggestions?

    Am pretty new at this, any suggestions would be most appreciated..

    You cannot install any fonts in any app on the iPad.

  • How to install new fonts on 10.6.8?

    When I attempt to add new fonts to font book, it crashes. I've restarted and tried initiating from font book, from the font itself...nothing works.

    Font Management in OS X

  • How to install new font

    Hi, seems like a simple question, but I just wanted to make sure I was following the right procedure. I want to install the new Indian rupee font. Is there a special procedure for doing or even a specific website that would be better to use? I assume those websites offering the new rupee font for windows will not work on my Apple. Your help would be appreciated. Thanks.

    Just for see, from :
    http://blog.foradian.com/rupee-font-version-20
    I downloaded the font named Rupee Foradian
    The symbol is available as a replacement of the character "grave accent" (On French keyboards, it's on the same key than the £ (sterling pound) character.
    The web page list an other font which is supposed to offer several variants of the character.
    http://blog.foradian.com/rupi-foradian-download-and-start-using-26-dif
    Rupi Foradian
    I downoaded it but :
    (1) it conflicts with the first one.
    (2) after removing completely the 1st one and clearing font caches, it behaves like the 1st one.
    I can't get the variants supposed to replace the Uppercase letters from A to Z.
    As I'm not sure that it was really tested by a mac user, I posted a message on the official dedicated site.
    Having experienced a currency change ten years ago, I wish good luck to Indian citizen.
    Yvan KOENIG (VALLAURIS, France) vendredi 17 septembre 2010 18:11:24

  • How to install new font on safari for windows??

    i have problem when i go to certain international sites.. for eg: http://www.deepika.com/
    in the help section the site provides the required font mlkr0ntt_TTF.ttf
    no luck just wont work..

    I have requested the website deepika.com, for their input on the issue.. Would love to see if a unicode font would solve the issue on Safari. The very reason I brought up this issue in this forum was to get a solution. Its not that I am unable to view the website in Internet explorer and Firefox.. I love using Safari and want to make it as my default browser, but issues like these prevent me from doing so now. When I started using Firefox, i remember facing similar issues.. and then came a Firefox Add-on developed by PCMan (Hong Jen Yee), yuoo2k from Taiwan, called IE tab (http://ietab.mozdev.org/) I was thrilled to be able to even run the Windows Update from a Firefox browser.
    Safari Developers are you taking notes..??
    Friends, I expect to watch Apple come out with an AD similar to the 'Get a mac - Refree' http://www.apple.com/getamac/ in future when comparing with IE and Firefox.

  • Using button, How open a new page using code

    I face a problem ... How can I open a page in my project when user click a button or choose a menu item ??

    you did not talk about your Technology or JDEv Version.generally make the action of your button or your command menu Item the outcome that you specified in the navigation to your page in the adfc-config
    Edited by: Hana on 22/05/2011 03:39 م

  • How to install new fonts on the system

    using java application.
    anu

    what files (names and extensions) did you download?
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
    window using the Lightroom 3 link to see those 'Important Instructions'.

  • How can i change font used by the java plugin?

    im running j2se 1.4.0 on win2k, and the java plugin is using a font that is not readable because sized way too small (also, the font is not a 'standard' font).
    the font is also applied do class loading or exception messages in java applets (in IE5.5, but i don't think that this is browser-related).
    is there a possibility to change to font (or the font size)?

    thanks for the tip, but this problem seems not to be tightened to the font.properties file:
    the wrong font is only used with the j2sdk1.4.0 plugin, not with that from j2re1.4.0 (actually, i had installed jre first, and afterwards j2sdk without removing j2re before). changing the plugin used back to j2re made the java console display the correct font (though the font.properties files were identically in both cases).

Maybe you are looking for

  • Installing Messaging Server on Windows XP

    Folks, I'm trying very hard to install the Messaging Server on my laptop running XP. Actually, I'm interested in evaluating the Calendar Server, but it seems I need the SJSMS as well if I want to be able to programmatically subscribe to notification

  • Create a screen by  teh help of pnp  ldb

    hi  expert ,                        i   have   a file ( new hire file ) New Hire file:  This interface program will be scheduled to run in the background and all the mandatory fields will be defaulted as shown below. End date will be defaulted with s

  • Reports in Favorite Reports did not run when open

    In SCOM 2012, I have run a few reports with the report template in the default SCOM management pack and saved them in the Favorite Report. When I open the saved reports at the Favorite Report again, they suppose to be run automatically. However, when

  • To learn

    Hi, I wish to learn flash media sever.... I dont have any knowledge in server side scripting.... i have good knowledge in action scripting.... What else i have to know to learn flash media server. Thanks, shanthi.

  • Publishing on Web

    -New at Adobe Flash ... -Created two slideshows; one using screens, the other as movie clips. -Published correctly; plays fine when tested on iMac's Safari and Firefox. -Uploaded the .html, swf, .fla and .js files for both slideshows. -The slideshows