Results 1 to 16 of 16
  1. #1
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default Adding new fonts to the list of available font??

    Hi. I had changed the font of a label to Wide Latin 11 Plain which is by default not present in the netbeans 6.8.. i was not aware of that.... i mean from where had it come to the list of available fonts in the netbeans.. because after formatting my system last night when i opened my project in the netbeans.. i found no such font in the library..i may have been added to the library after i installed msOffice 2010.. perhaps. i don't know.:eek:

    But i neeed to keep this font for my labels.. my question is how can i add new font to netbeans and also to my project.. so that whenever i export my project to a new system the same font lasts.

    i download the above stated font from the following link but don't know what to do the next.
    NewFonts.net - Wide Latin font
    The Quieter you become the more you are able to hear !

  2. #2
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    Yeah... I was right. When i installed the MSOffice 2010 this font was also installed on my system.. How i confirmed this as.. these fonts are not available on MSOffice 2003. Also I downloaded this font and installed it separately.. and it was automatically added to the list of available fonts in the netbeans..

    But my problem remains the same these fonts not lasts when i export my project to some other system... i mean like we add jar files to our projects ;; isn't there any way we can add fonts to our projects??
    Last edited by Stephen Douglas; 04-15-2010 at 05:50 PM.
    The Quieter you become the more you are able to hear !

  3. #3
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    anybody??????????????????
    The Quieter you become the more you are able to hear !

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  5. #5
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    I need to deploy my application at the client site... In that case what should be the best practice?? please suggest.

    I mean when i install my application at the client site.. how can i install the required fonts as well along? exactly as msoffice does.;)
    The Quieter you become the more you are able to hear !

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Within the application you've to install the font. Or externally you've to ask from the user to install. My suggestion is at that point first of all you've to check that application installing machine relevant fonts are available, and if not you've to load a default font. Otherwise your application ends-up with an error.

  7. #7
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    Within the application you've to install the font.
    How could it be done.. i mean i didn't get it ... install within the application:rolleyes:??
    The Quieter you become the more you are able to hear !

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    You have to think a way to install a font in Java. That's all. For an example, in Windows, all the fonts are located in C:\WINDOWS\Fonts path. So what you can do is, simply copy the font to that location when you start the application. But if you are using your application in UNIX systems, then you have to think a way to related with relevant OS.

  9. #9
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    Each application retrieve by the system.
    does that mean that if i delete all the fonts from C:\WINDOWS\Fonts there will be no available fonts in netbeans??:D
    The Quieter you become the more you are able to hear !

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    As I suggest you, you have to validate your font at the time of application loading. If it's not found then use default fonts. Say those initial validation test within there own structure, then deleting those fonts are not effected. But most of the application wont do that. So as far as I know NetBeans not using such fronts included in it's own folders. Delete all the fonts and give a try. :p But actually you cannot delete all the font in the system. Because your system, or the OS use some font there too, means in use all the time.

  11. #11
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    Delete all the fonts and give a try.:p
    :cool: I deleted all the fonts from the c:\windows\fonts..... but there were few that retained in that folder and those were..

    Tahoma Bold(True Type)
    Tahoma(True Type)
    Script(All res)
    Modern(All res)
    Microsoft Sans Serif(True Type)
    Franklin Gothic Medium Italic
    Franklin Gothic Medium


    and those that were available in the netbeans after deleting all the fonts from the specified directory....

    Dialog
    DialogInput
    *Franklin Gothic Medium
    Lucida Bright
    Lucida Sans
    Lucida Sans Typewwriter
    Marlett
    *Microsoft Sans Serif
    Monospaced
    SansSerif
    Serif
    *Tahoma


    As you can see that the fonts that are marked with an astrick sign in the list of available fonts in the netbeans are also available in the list of fonts in c:\windows\fonts...

    My questions are::
    1. Why not all the fonts available in the c:\windows\fonts are shown in the netbeans??

    2. From where has netbeans fetched the extra fonts that are actually not available in c:\windows\fonts??

    3. If netbeans has fetched these extra fonts from its personal directory then how can i make "my application" to fetch the required fonts from its personal directory?? that are not available in c:\windows\fonts?
    The Quieter you become the more you are able to hear !

  12. #12
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Have you read the Sun Swing tutorial section on Fonts? If not, it may be worth your while as it seems to have the solution to your problem: Font Tutorial

  13. #13
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Stephen Douglas View Post
    1. Why not all the fonts available in the c:\windows\fonts are shown in the netbeans??

    2. From where has netbeans fetched the extra fonts that are actually not available in c:\windows\fonts??

    3. If netbeans has fetched these extra fonts from its personal directory then how can i make "my application" to fetch the required fonts from its personal directory?? that are not available in c:\windows\fonts?
    Yeah, seems that my conclusion is wrong then. Because as you check that some fonts are not listed in font folder instead IDE font list. That mean some fonts are retrieve from another resource, may be NetBeans has some default fonts.

    I think best solution would be handle required font for you withing your application.

  14. #14
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default

    handle required font for you withing your application.
    But how??????
    The Quieter you become the more you are able to hear !

  15. #15
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Stephen Douglas View Post
    But how??????
    Did you go through the tutorial linked to in my post above?

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Fonts (Changing Fonts and Color's)
    By dbashby in forum New To Java
    Replies: 10
    Last Post: 04-06-2009, 02:32 AM
  2. Replies: 4
    Last Post: 03-10-2009, 07:31 AM
  3. adding list to an array element
    By Preethi in forum New To Java
    Replies: 5
    Last Post: 09-25-2008, 05:23 AM
  4. Adding List to MIDlet Display
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-23-2007, 03:07 PM
  5. adding a variable in order to a list
    By Jrr in forum New To Java
    Replies: 2
    Last Post: 11-19-2007, 02:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •