Making a font menu...

I am makeing a font menu for a program of mine, I use the following:
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontNames = ge.getAvailableFontFamilyNames();this works fine except it shows ALL the types of fonts such as
Arial
Arial Black
Arial Bold
Arial Bold Italic
Arial Italic
all I want in the menu is the main font names, asI have a second menu for the styles etc.
also is it possible to set the height of a JMenu as mine is quite long, I would prefer to have it scroll up and down rather than show a menu the height of the screen.
any help would be appreciated.
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontNames = ge.getAvailableFontFamilyNames();
//System.out.println(fontNames);
for(int i=0; i<fontNames.length; i++){
miFonts = new JMenuItem (fontNames);
fontMenu.add(miFonts).setEnabled(true);
miFonts.addActionListener(new fontListener());

thanks for the replies...
This is peculiar behavior. I only got all of the font
names when I calledthats what i thought should happen, what OS are you using I am using Mac OSX with Java 1.3, maybe it is a mac specific thing..

Similar Messages

  • Need Help making a navigation menu for a website

    Alright so I've been having some problems getting this to work correctly. I am making a navigation menu for a website and I'm trying to get when I hover over the main header a drop down appears animated of course below it. I also want when you highlight a specific text line for it to highlight blue along with a rectangle behind it to change to a lighter shade of red.
    Some of the problems  I have been running into is play and stop commands on mouseover and them not stopping when they should and getting the text to change color.
    Thanks for the help.
    Here are some screen grabs of what I am doing
    http://imgur.com/W2bZuF3
    http://imgur.com/W2bZuF3
    http://imgur.com/2GI3y71

    Your page's code is still a bit of a wreck.  Do you ever look at it?
    <html>
    <style type="text/css">#p7MBM_1 {
      width: 951px;
    You need a doctype first - I recommend HTML4.01 Transitional.  Open this (and other pages) in DW and use FILE | Convert > HTML 4.01 Transitional, then save.  But wait until you do the other changes recommended below before doing this.
    Add a <head> tag below the <html> tag.
    Add a <title> tag below the <head> tag.
    Add this below the <title> tag - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    Add </head> below this -
    <style type="text/css">
    <!--
    .style10 {font-family: "Goudy Old Style"}
    -->
    </style>
    You may want to change that font-family style to "Goudy Old Style, Geneva, Times, 'Times New Roman', serif", since Goudy is not web safe.
    Move <body> below that </head> you just added.
    That will clean your code up a bit.  Let's look at the page again when you have done these.

  • Post script font is not being displayed in font menu

    Im tying to use a system font (post script) for my website, but its not shown in the font menu in muse. (but it is in every other app on my mac).
    installed the latest release and bug fix on os x 10.9.4
    any ideas? thanks!

    Muse (just like any browser) doesn’t support Postscript fonts.

  • Some fonts have wrong "internal names," won't display properly in font menu

    Several fonts which I have acquired over the years have a peculiar but bothersome problem.
    The fonts' "file names" in the Finder are perfectly fine, and the files are named what they're supposed to be named. And when the fonts are "installed," they work perfectly fine in all applications, as they are supposed to. But here's the problem: the fonts are mis-named in each application's "font menu." In my case, most of the font names (which are of the standard English alphabet and have standard English font titles) instead appear listed as a long string of Chinese characters.
    As a random example, a font called "Holiday Ranch" made by FontDiner is not listed alphabetically between "Hoefler" and "Impact" in my font menus, where it ought to be, but instead is listed at the end of the font menu list, after "Zapfino," as a long string of Chinese characters. This wouldn't be such a problem if there were only one or two fonts misnamed this way, but when (as I do) you have 25 fonts at the bottom of your font list, all of which are long strings of incomprehensible characters, then it becomes a problem indeed.
    The fonts come from a variety of sources, so it can't be a flaw in just one company's coding. I contacted (as per the example above) FontDiner, but so far they have no response. But for other mis-named fonts in my collection, I don't even know who designed them or where they came from, so I can't ask the designer for a solution.
    Keep in mind that all of the fonts work perfectly fine, once I've tracked them down in the big morass of hard-to-find misnamed fonts at the bottom of my font menus. They work in all Apple applications like TextEdit, they work in Adobe products like Illustrator, they work in MSWord -- they work everywhere. The only issue is the naming.
    Also, the file names are all correct. In the example above, the file name for "Holiday Ranch" is "Holiday Ranch.ttf". And when I inspect the font with Linotype's "FontExplorer X," it is listed properly as "Holiday Ranch." But here's the key: When I open the font file in Apple's "Font Book" (v.2.2.1), the name is indeed listed there as a long string of Chinese characters, and when I install it onto my computer using Font Book, it unfortunately uses that name.
    I've tried downloading a wide variety of "font tool" programs, but none have been able to fix this problem.
    I also tried (using FontExplorer X) "Cleaning system font caches" and "Cleaning application font caches" and restarting, but that had no effect whatsoever. I don't think it's an error on the part of OSX, I think that the fonts are simply misnamed internally, or that something went awry when the font designer converted the fonts from one format to another, or something like that.
    I think the simplest solution would be to just re-name the fonts internally. But how? I can't find a way to do it. Even the optimistically-named freeware program "Font Renamer" did not change the internal names.
    Has anyone else ever experienced this problem, and if so, how can it be fixed? Thanks.

    As for free downloads to play with: unfortunately, the FontDiner ones are all commercial and thus not free...
    They do have some free fonts. At the bottom of the first page (after the lead in page), click the "Free Silverware" link at the bottom. The fonts that come up on that page are all free.
    I downloaded four of those fonts at random. All work as expected. That doesn't prove though that the Holiday Ranch font doesn't have something wrong with it.
    Kurt, as I noted above, I already did empty all font cache files and restart. Unfortunately, that did not fix the problem.
    Oops! Sorry, missed that.
    So I think the problem is not that there's anything wrong with my OS, but rather that the person who made the font simply goofed when giving it a name!
    It seems to point that way, but you're seeing the issue across fonts from different vendors. I would believe it's either the OS, or Font Book itself.
    Your tagline shows you're running 10.6.4. Download and reinstall the 10.6.4 Combo updater. It's surprising how many problems go away when applying the combos.

  • Why don't some of my .ttf fonts appear in the font menu?

    Hello,
    I have a number of .ttf fonts installed on my system (located in Win7/Windows/Fonts folder) which do not appear in Flash or other Adobe applications such as InDesign. I did try putting them in the Fonts folder of these programs instead of the default Windows location but that didn't work! The fonts are available in the font menu in Microsoft Word 2010. The fonts all have a dot before the file name, see below. So could that be the problem? I am using some of them to type Vietnamese characters. Can anyone help?

    That did it, thanks.  Now they still don't.fully load but they do have links at the bottom to get the rest of the message.

  • Illustrator/Photoshop CS5.5 crashes when I'm in the font menu

    Hi there, I've seen another discussion about this, but unfortunately it didn't solve my problem. I'm running Yosemite and Illustrator CS5.5 (I've had some similar problems in PS too). When I go into the font menu in Illustrator, I'll start scrolling and it crashes. Sometimes I don't even get to scroll before it crashes. Admittedly I've downloaded a lot of fonts lately, so I thought it might be a corrupt font. Sure enough, I found a couple of bad ones, and some sketchy ones, and I removed them. Then I went and cleared my font caches using Onyx. Neither of these things seem to help. I know I'm not the only one who is having this problem. Any help would be greatly appreciated!

    bexicon,
    Did you try item 1) in 5) of the list? That implies moving all the fonts out, then see, then move half the fonts in again, or something similar, to find every substandard font that might hide somewhere.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Customize format toolbar AND font menu

    The "customize toolbar" options are many fewer than all the commands I use. I'd like to add other format commands, such as highlighting text (aka character background fill), to either the text format toolbar or the main toolbar.
    Secondly, can I alter the font menu so that it (1) shows fewer fonts, or (2) shows frequently-used fonts at the top, or (3) displays font names in their own typeface?
    Thanks very much.

    PinocchioComplex wrote:
    The "customize toolbar" options are many fewer than all the commands I use. I'd like to add other format commands, such as highlighting text (aka character background fill), to either the text format toolbar or the main toolbar.
    Feature unavailable.
    Highlighting text is already available in the format bar (white rectangle with a lowercase a).
    Secondly, can I alter the font menu so that it (1) shows fewer fonts, or (2) shows frequently-used fonts at the top, or (3) displays font names in their own typeface?
    1 = no
    2 already available in the Font panel: Fonts > Collections > Favorites
    3 already available in the Font Panel: Fonts > Collections > Recently Used and/or Favorites
    The PDF Users Guide is not only for us, _it's also for you_
    Yvan KOENIG (from FRANCE samedi 19 juillet 2008 15:16:39)

  • Please fix the Illustrator Font menu(s)

    I can't find any real discussion on this subject anywhere, so hopefully it's not an over-repeated gripe, but why has Adobe through many iterations of Illustrator CS not migrated the Photoshop and InDesign font menu systems to Illustrator? As a creative designer who uses Illustrator as much as any other CS program, I find the font menu in Illustrator to be unbelievably user-unfriendly. Having either a Type > Fonts menu which you can't scroll through at will (no scroll bar, just slow buttons), or having a Character pane font list with no font previewing in it (I use Windows 7) doesn't make any sense. Unless there's some Illustrator menu preference table somewhere where I can set these options, it's time to fix this chronicly repeated design flaw that persists through every version of the software... please.

    why has Adobe through many iterations of Illustrator CS not migrated the Photoshop and InDesign font menu systems to Illustrator?
    Code is code and different host APIs require different code. And especially an old hag like AI is going to require a lot of work to adapt even the tiniest bit of resonably contemporary code because the program is so hopelessly behind the curve in too many areas. It sucks, but it's just this way and in light of it's more serious deficiencies like the extremely bad memory handling, this kind of thing is probably one of the lesser inconveniences/ annoyances...
    Mylenium

  • Can't change the font directly in the FONT MENU.

    Recently I noticed a strange problem (?) When using my ADOBE INDESIGN CC 2014.2 When I try to use the fonts, I can only see a message asking me to connect with typekit .
    But, even after connecting it to my adobe account, I can't access my local fonts. The only way to access my fonts is goint in the menu TEXT > Fonts (as seen below).
    From there I can access all the fonts normally. 
    The program is updated and I have no idea how to solve it.
    Can you please help me to solve this issue? Thanks a lot everyone!

    Hi Isis,
    I'm sorry that you ran into trouble with this.  It looks like you have the Typekit filter turned on in the font menu, so it is only showing those fonts you have synced from Typekit.  Since you haven't synced any, the list is blank.
    To turn off the filter, click the grey T at the top of the menu.
    Once the Typekit filter is turned off, you should see all of your installed fonts listed again.
    Please give that a try, and let me know if you have any other questions.  Best,
    -- liz

  • Illustrator CS5 crashes when scrolling through font menu.

    Hello Adobe Community,
    I am in desperate need of help with my Illustrator CS5 program. It has suddenly started to crash when I scroll through the Font menu from the Type menu at the top of the program. I am using a late 2013 Macbook Pro 13" with retina display on OSX 10.9.2. I am using Illustrator CS5 v15.0.0. I have read through scores of forum threads and tried every solution that was suggested and still cannot resolve this problem. I am stumped and my back is up against the wall. My work flow has now slowed to crawl since I have to now search through fonts using FontBook then manually type in the font I need in the font character field. I believe this problem is due to a corrupt font. The trouble started after I installed a new font. I have since deactivated and deleted that font but the problem persists. I am not a "tech head" so I don't know how to generate those long code pages that some can. I can make pretty pictures with Adobe products but I can't service those Adobe products.
    Here is a list of things I have tried so far (at least what I remember):
    *     I have deactivated and deleted the font I believed to be corrupt.
    *     I have validated all my fonts with FontBook and deleted all corrupt files.
    *     I have turned off the "enable missing glyph protecting" in the preferences.
    *     I have used FontNuke to delete my font caches.
    *     I have reset my Pram.
    *     I have repaired all my permission with disk utility.
    *     I have removed all fonts except for the standard system fonts.
    *     I have uninstalled Illustrator and done a clean install (my system was migrated from a backup-however is has worked fine for months).
    *     I have deleted my library/preferences/abobefnt.plst.
    *     I have change the font preview to small.
    *     I deleted all my fonts and restored them from time machine from before I had installed that last font I believed to be buggy.
    *     I have prayed to Jebus.
    So far none of this has worked. The closest I got was after deleting all the corrupt fonts with FontBook. It worked for a day. Then the next day started crashing again. I am completely lost at this point. I don't know what else to do.
    Can anybody please help me figure this out?
    BK
    Update - I figured out how those crash reports are done so if anyone thinks they can help but needs to see a report please let me know and I will paste it into a reply.
    Update 2 - I tried turning off the font preview all together and this seems to have stopped the crashes so far. I think the bug can be isolated to this function. Problem is I need that function.

    Hello Adobe Community,
    I am in desperate need of help with my Illustrator CS5 program. It has suddenly started to crash when I scroll through the Font menu from the Type menu at the top of the program. I am using a late 2013 Macbook Pro 13" with retina display on OSX 10.9.2. I am using Illustrator CS5 v15.0.0. I have read through scores of forum threads and tried every solution that was suggested and still cannot resolve this problem. I am stumped and my back is up against the wall. My work flow has now slowed to crawl since I have to now search through fonts using FontBook then manually type in the font I need in the font character field. I believe this problem is due to a corrupt font. The trouble started after I installed a new font. I have since deactivated and deleted that font but the problem persists. I am not a "tech head" so I don't know how to generate those long code pages that some can. I can make pretty pictures with Adobe products but I can't service those Adobe products.
    Here is a list of things I have tried so far (at least what I remember):
    *     I have deactivated and deleted the font I believed to be corrupt.
    *     I have validated all my fonts with FontBook and deleted all corrupt files.
    *     I have turned off the "enable missing glyph protecting" in the preferences.
    *     I have used FontNuke to delete my font caches.
    *     I have reset my Pram.
    *     I have repaired all my permission with disk utility.
    *     I have removed all fonts except for the standard system fonts.
    *     I have uninstalled Illustrator and done a clean install (my system was migrated from a backup-however is has worked fine for months).
    *     I have deleted my library/preferences/abobefnt.plst.
    *     I have change the font preview to small.
    *     I deleted all my fonts and restored them from time machine from before I had installed that last font I believed to be buggy.
    *     I have prayed to Jebus.
    So far none of this has worked. The closest I got was after deleting all the corrupt fonts with FontBook. It worked for a day. Then the next day started crashing again. I am completely lost at this point. I don't know what else to do.
    Can anybody please help me figure this out?
    BK
    Update - I figured out how those crash reports are done so if anyone thinks they can help but needs to see a report please let me know and I will paste it into a reply.
    Update 2 - I tried turning off the font preview all together and this seems to have stopped the crashes so far. I think the bug can be isolated to this function. Problem is I need that function.

  • Font Title Not Displaying in Character Panel Font Menu

    Just updated to OS X Yosemite and noticed that the font titles don't display in the Character Panel > Font Menu.  However, they do display when rolled over with the cursor.  This is only happening in Illustrator.  All other Adobe apps are correctly displaying font titles.  Anyone else having this problem?
    Using Adobe Illustrator CS5.1 / Mac OS X Yosemite

    fonts, björn, scott,
    Unless three step reinstallation helps, you may wish to roll back from Yosemite and wait to see whether the issues will be solved and reported as such.
    Weeding out in older plugins seems to have helped some in some cases. It also seems that JAVA Runtime may be involved, for some it seems to help to roll back to an ealier version, for others to update to the newest.
    All the above is more or less hearsay so far, with no definite final confirmation.
    In any case, there is something to be sorted out by someone.

  • Font menu hangs

    HELP!! I think there might be a problem with the font menu utility running on mail. When I go to change the size or typeface ...anything that requires the use of the font menu, everything grinds almost to a halt and the ball keeps spinning. Sometimes it actually does what I want it to do and sometimes it doesn't ...after an exasperatingly long wait.
    Is the application corrupted? I'm using font reserve.
    Thanks.
    Sarah
    1.33 PowerPC G4   Mac OS X (10.4.8)  

    This message occurs whenever your installed fonts change. I work for a publisher so was getting it all the time as I turned fonts on and off for different projects.
    In Office 2004, do this:
    1. Go to */Applications/Microsoft Office 2004/Office/Support Files/*
    2. Rename or move FontCacheTool. (Requires administrator access)
    In Office 2011, do this:
    1. Go to *~/Library/Preferences/Microsoft/Office 2011/*
    2. Delete *Office Font Cache*
    3. From Terminal, type touch" then drag in the Office 2011 folder
    4. Back in the Finder, do Get Info on the new, empty *Office Font Cache* file. Make it read only and lock it.
    Notes:
    1. WYSIWYG menus will now just show the font name in standard font.
    2. You may be able to disable the 'optimising' message more easily by going to Word's preferences and turning off the 'WYSIWYG font and style menus' tick box in the General section. This takes affect in all Office applications but doesn't seem as reliable at preventing the caching problem.
    4. Newly added fonts should still appear when you next start an Office application.
    3. However you have Office set up, it can't see certain fonts. They are the ones logged to Console, e.g.:
    12/04/2011 09:58:14 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framewo rk/Support/fontd[21782] ATS Font family could not be created for Abaton ITC Std - Legacy Applications may not see this font

  • Apple Chancery not appearing in font menu

    How do I get Apple Chancery to appear in form menus?
    It's functional in Illustrator, the font is subsetted within a PDF saved from Illustrator. If I add a form field, I can't see Apple Chancery within the font menu anywhere. The client wants to use the font!

    First Apple-Chancery is not a font that you can purchase separately.  It is only included with the OS.
    There are a couple of questions that you need to answer:
    1.  Is Apple Chancery allowed to be embedded for forms embedding?  If it is not allowed to be embedded then Acrobat is "supposed" to read information from the font licensing flags and NOT show it available in the form field list.  My guess is that this is actually what is occurring.
    2.  What type of font is Apple-Chancery?  It may be a technical limit but that is unlikely.
    Adobe Font Licensing
    Here is the Font Licensing Table that Adobe provides for it's fonts:  Additional License Rights, font permission list | Adobe
    Font Permissions Table
    Key:
    1 : Licensed for print and preview embedding
    2 : Licensed for editable embedding
    3 : Licensed for modification
    4 : Licensed for users who directly license DPS
    5 : Licensed open-source fonts
    I was not able to find any such page on Apple's web site but a third party sit had this listing:  Apple Chancery - Licensing « MyFonts
    You would need to check with Apple to find out the definitive licensing.

  • Change font menu source?

    In the font menu in Pages' toolbar, I see all fonts installed on my computer - even those in other scripts such as Arabic. On the other hand, in TextEdit, I see only the fonts in the "English" list in Font Book. Is there any way I can make the font menu in Pages (and the rest of iWork) work the same way? Could I do the same in Office 2011?
    I'm hesitant to disable those fonts on the system level to get the same effect. While they're not on the list of required system fonts, as they represent other scripts the computer is capable of showing, I think there might be unintended consequences.

    Sleep_with_angels wrote:
    Could I do the same in Office 2011?
    The best place to search/ask about Office issues is probably the forums run by the people who make it:
    http://answers.microsoft.com/en-us/mac/forum/macword

  • Font menu in Mountain Lion´s Keyboard Viewer?

    I lost track of the font menu in Mountain Lion´s Keyboard Viewer. Where did the font menu go?

    Hi,
    Do you mean this ?
    That's the Character Viewer turned on in System Preferences > Language and Text  > Input source tab.
    9:38 PM      Sunday; January 13, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • How to curve text

    How can I curve text in Pages (trying to align text with the bottom of a circle)

  • Shouldn't 180 degree orientation be a standard for all iPad applications?

    I find it curious that there isn't a de facto standard for viewing angles on all third-party applications, and that some applications literally appear "upside down," when trying to use the iPad in its case - with the easel flap tucked in - for landsc

  • Adobe Acrobat NOT Embedding All Fonts...

    Hi all, We are using Adobe Acrobat 8.0. One of the Print Houses trying to print our manuals on press is having font trouble. They are claiming we have not embedded one of our fonts. Our distiller is set up so all fonts are embedded - so we have no cl

  • Help on Installing the SAP Best Practices Baseline Package

    We are in the process of installing the SAP Best Practices Baseline Package. We are on ECC5.0. Any tips/ tricks/ gotchas will be greatly appreciated.

  • Not able to see SAP Authontication in CMC

    Hi, We have installed SAP BO XI3.1 SP3 linux version. We have been successfully installed business objects XI 3.1 SP3 on linux X64bit version. We have installed SAP integration also on same server we have installed it sucessfully. I was able to see S