Getting differend fonts on JList

I was helped to do like this to get different fonts visible on JList. How ever I can't get selectable list (Jlist) of fonts shows on it's own font...
If i create a Component and FontListCellRenderer and use FontListCellREnderers method getCellListRendererComponent(.....) I can place the return value into this new Component and add this component to JPanel...
but how to do this so that all the fonts are shown in a list and the list added to JPanel?
String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
Font[] fonts = new Font[fontNames.length];
for(int idx = 0; idx < fontNames.length; idx++)
          fonts[idx] = new Font(fontNames[idx], Font.PLAIN, 12);
JList fontList = new JList(fonts);
fontList.setCellRenderer(new FontListCellRenderer());          
public class FontListCellRenderer extends DefaultListCellRenderer
public Component getListCellRendererComponent(JList list, Object value, int idx, boolean isSelected, boolean hasFocus)
// Assume that the list is populated with Fonts...
Font font = (Font)value;
// Get a renderer component suitable for displaying the name of the font
Component comp = super.getListCellRendererComponent(list, font.getName(), idx, isSelected, hasFocus);
// Alter the renderer component to use the font
comp.setFont(font);
return comp;
P_trig     

This would not take care of all issues but have you tried changing Preferences – Interface – UI Font Size?

Similar Messages

  • How do I get my font suitcase fonts on my old Mac to my new 10.8.5 mac?

    Hi Everyone,
    I recently bough a new mac laptop becaue my desktop mac was running slow and not letting me use my design applications properly (freezing, crashing, and in general just being slow). I am a graphic designer, and have fonts on my old desktop mac that I need to have on my new laptop mac for client work.
    I went thru my old mac (I am not sure what original version it is, but it had been upgraded a few times to the 10.6.8), found all of the fonts and collected them into one folder, placed it on my new mac, and proceeded to install the fonts. The problem that I am having is that my old mac has a lot of fonts that are a font suitcase file, instead of a regular font format, and I cannot install these onto my new mac.
    I do not have access to any other forms of these fonts, so I only have the font suitcase versions.
    Is there something that I can do to make these install? It's becoming a pain to have to open up a document on my old mac to get the font and then outline it and open it on the new one (since the old one runs slow).
    Any help is much appreciated!
    Thanks,
    Melissa

    I am not sure, how would I find that out?
    You kind of have to know ahead of time. But here's one example of a Type 1 PostScript font:
    The suitcase here has .scr (short for screen fonts) tacked on. Sometimes it will say .bmap (bitmapped screen fonts, same thing). Many won't have any extension. It doesn't matter if they do or not. This particular font has only one matching printer font. The suitcase will have at least as many screen fonts in it as there are outline fonts for the set.
    A Mac legacy TrueType font will have the same icon and also have a Kind description of "font suitcase". There really isn't anything that will easily set them apart to know which one you have.

  • I cant get the font to work on a picture in Photoshop, I have watched at least 12 how to videos and it wont work, Help

    I cant get the font to work on a picture in Photoshop, I have watched at least 12 how to videos and it wont work, Help

    Could you capture your screen and post it. Have the layers panel open and any layers that are collapsed, expanded. We will need to see the entire screen, as some information in the tab is important as well.

  • Can't get TypeKit fonts to work in Adobe Muse!

    HI there!
    Just wondering if anybody new how to get purchased fonts from TypeKit to work as HTML in Adobe Muse?
    I have tried following the link below but when I go to publish my site the text is still all images.
    Problem is I know nothing about code but this seemed pretty straight forward to follow but don't seem
    to be getting any luck with it.
    I was trying to use the font 'Museo Sans Rounded' and I was told to try maybe other fonts which I did and
    also they did not work, but If I just take a font from within the Adobe Muse/TypeKit 'Web Fonts' then this works.
    Please could someone explain to me if I'm doing something wrong or if there is a better way of acheiving this?
    Many thanks
    Darren
    www.segmentdesign.co.uk
    http://museinsider.com/how-to-add-typekit-fonts-to-your-muse-site.html

    Hi Liz,
    Many thanks for getting back to me.
    Below are the screen shots of me:
    1. Going into Typekit
    2. Selecting chosen ‘Kit’ and checking that the font ‘Museo Sans Rounded’ is WEB SAFE.
    3. Launching ‘Kit Editor’ and setting the ’Selectors’ > ‘.body’ & ‘.header’ > ‘PUBLISH’
    4. Then I go into Muse and select the ’header' font e.g. I’m a freelance graphic designer &
    illustrator based in Bristol.’ then go to ‘Paragraph styles and highlight ‘header’. I then PUBLISH
    my site only for it to still be an image.
    Am I doing this correctly?
    How do I get the ‘Museo Sans Rounded’ web safe font from Typekit into the window e.g. your screen grab?
    I will have a go at putting Arial font into title and then see what happens from there!
    Many thanks
    Darren
    SegmentDesign™
    Darren James
    Freelance Graphic Designer & Illustrator
    07983 547 028
    [email protected]
    segmentdesign.co.uk
    
> & illustrator based in Bristol" ?
    Instead of choosing a system from the font menu, please try selecting one of the "web safe" fonts that are built into Muse, such as Arial. When you re-publish your site, you should see regular text again instead of the images.
    2) using the font from Typekit
    Once you have text showing up instead of images, we can work on applying the Typekit fonts.
    The kit that you are currently using in your site (ID bnb1odj) doesn't include the font Museo Sans Rounded.  Would you please check in your Kit Editor that you are using the right embed code for your Museo Sans Rounded kit?
    You can find the embed code by logging into https://typekit.com, launching your Kit Editor, and clicking the "embed code" link at the top right.   Copy this code and add it to Muse under the Page > Page properties menu item.
    Please give that a try, and let me know how it goes!  Once you have republished the site, I can take another look and give you some information on how to set the Typekit fonts in your CSS.
    Thank you,
    -- liz
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6237014#6237014
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6237014#6237014
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6237014#6237014. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Help with using Adobe Muse CC at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Editting PDF documents that were created by a MAC doesn't work because of font incompatability.  How can we get MAC fonts and load in our Adobe Acrobat Pro 9?

    Editting PDF documents that were created by a MAC doesn't work because of font incompatability.  How can we get MAC fonts and load in our Adobe Acrobat Pro 9?

    If it's a Mac font and you're on Windows, you can't. If you are also on a Mac, you'll need to purchase the fonts (fonts are generally non-transferable, like software. One of the reasons pdf exists), install them and try your edits.
    But it's best to edit the original document and create a new pdf when finished.

  • How to get the font name used in document?

    Hi some one help me to get the font name which should check each text in the Illustrator CS3.
    Please someone guide me..
    sAIFont->FontKeyFromFont(AIFontRef FntRef,&fontKey);
    Here what to set for fontref..

    Oviya... wrote:
    Hi some one help me to get the font name which should check each text in the Illustrator CS3.
    Please someone guide me..
    sAIFont->FontKeyFromFont(AIFontRef FntRef,&fontKey);
    Here what to set for fontref..
    Are you talking about the location of the font?

  • Can't figure how to get larger fonts in terminal

    I am new and very happy to say I've got Arch/XFCE/nfs working on network and soon to work on Samba but how in the wide wide world of sports can I get larger font on my terminal when in XFCE?
    Thanks in advance,
    Dave

    naperdave wrote:I am new and very happy to say I've got Arch/XFCE/nfs working on network and soon to work on Samba but how in the wide wide world of sports...
    I too have experienced the "agony of defeat" with fonts and xterm.  Here is how I use to launch my xterm:
    xterm -fa "andale:size=18" -bg black -fg white -geometry 80x25 -tn xterm-color -sl 1000
    * The key is the "size" parameter after the font (fa)mily name.  I was using True Type fonts and was using "andale" in this case.  I believe the size field should be applicable to whichever font you choose.  Alternatively, I believe you can pass the "-fs" option to xterm to accomplish the same thing as ":size".
    For example,
    xterm -fa "andale" -fs "18"
    will accomplish the same text size as in the first example.  Just try different font size (fs) values, and see which values will actually scale for that font.
    One caveat, I believe the "fa" option for xterm is limited to the freetype library fonts.

  • I get missing fonts when opening a PDF, but the fonts are activated, I get garbage

    I get missing fonts when opening a PDF, but the fonts are activated, I get garbage

    The activated fonts are not the same version as those in the PDF. If you use Type>Find Font and replace the fonts with ones from your computer does it work?

  • When going from a Mac-based Ai to a PC based Ai, the documents "Font" are not found on the PC version?  (mostly Helvetica) where and how do I get those Fonts?  And/or, can I use the Mac version of these Fonts?

    When going from a Mac-based Ai to a PC based Ai, the documents "Font" are not found on the PC version?  (mostly Helvetica) where and how do I get those Fonts?  And/or, can I use the Mac version of these Fonts?
    Thanks, Rich

    In order to be cross platform you must be using the Open Type version of all fonts to cause the least disruption. Macs can read and process the Windows .ttf  type format but PCs can't process Mac formatted type. Most recent versions also cannot use the older PS Type 1 fonts.

  • Get a font's file name from the font's postscript name (on Windows)

    I am trying to obtain the the font file name when the only information I have is the font's 'postscript' name. (Emphasis: the font's name is postscript and not the font).
    For example I have the following postscript name: TimesNewRomanPSMT.
    The real name that is saved in the registry is: Times New Roman (TrueType).
    Is there any way of obtaining that name from the given postscript name?
    Currently I am coding this for Windows, but it should be compatible, or at least have alternative code for MacOS

    Funny. I'm having the same problem and was about to post the exact same question
    In Photoshop, there is "app.fonts", which lets you get a font's postscript name from the font's name. This doesn't exist in After Effects.
    My only hope is that there's a way to get a font's postscript name in Visual Basic. I'll let you know if I find anything useful.

  • [SOLVED] Cannot get japanese fonts working in console

    First time with Arch. Did a clean install yesturday with Plasma as my choice of GUI.
    I have everything work, except for getting Japanese font support in consoles.
    First, fonts worked inside Dolphin, but looked terrible. So I added the infinality repos and installed infinality-bundle, infinality-bundle-multilib, ibfonts-meta-base, and ibfonts-meta-extended.
    This was probably overkill, but fonts look perfect in both my file manager and applications, but still no support in console, konsole, uxterm, or yakuake terminals.
    Then I made sure both "en_US.UTF-8" and "ja_JP.UT8" inside of /etc/locale.gen were uncommended and then ran "locale-gen" as root to generate the locales. After a reboot the fonts still wont work, the appear as ? in console.
    Any help would be greatly appreciated.
    Last edited by lolihunter (2015-05-08 16:51:07)

    After a lot of messing around, I finally got it to work.
    Not only did "en_US.UTF-8" and "ja_JP.UT8" need to uncommented, but also "en_US.ISO-8859-1" and "ja_JP.EUC-JP".
    Running "sudo locale-gen" then returned:
    Generating locales...
      en_US.UTF-8... done
      en_US.ISO-8859-1... done
      ja_JP.EUC-JP... done
      ja_JP.UTF-8... done
    Generation complete.
    As expected. Oddly enough, the output of "locale" has not changed at all, but now japanese fonts show up correctly in shell and terminals, even without a reboot!

  • I am trying to find an old mac font.  It's the techno (apple) font that was available with OS 9.  How can I get this font?

    I am trying to find an old mac font.  It's the techno (apple) font that was available with OS 9.  How can I get this font?

    I think that was Tecno. Techno appears to be a whole class of fonts.
    Is this the one? http://www.dafont.com/tecno.font
    That's a .ttf version which should work OK with current OS.
    As an aside, I was searching for Apple Textile for quite some time when it was pointed out to me that it was used by iDVD. Sure enough, opened up the installer package for iDVD with Pacifist and there it was. Now working fine on all my Macs!

  • How do i get the font on my iMac bigger

    how do i get the font on my iMac bigger

    Welcome to the Apple Support Communities
    There are different ways, but I recommend you to reduce the resolution. To do this, open System Preferences > Displays, select "Scaled" and a resolution

  • HT4561 After updating to 10.6.3, I installed the 10.6.8 update just to start experiencing these font issues. HELP! How do I get the fonts to display correctly in my browsers especially (Chrome & Safari)

    After updating to 10.6.3, I installed the 10.6.8 update just to start experiencing these font issues. HELP! How do I get the fonts to display correctly in my browsers especially (Chrome & Safari)

    What I ended up having to do was open up the Font book & remove duplicates. I knew it was Arial that was causing the problem, so I deleted the duplicate of that font. Inadvertantly I deleted all the Arial regular font, so I had to reinstall one copy. That was the solution. Thanks!

  • Get system font size (CL_GUI_RESOURCES= GET_FONTSIZE)

    I'm using CL_GUI_RESOURCES=>GET_FONTSIZE to retrieve the SAP GUI font, so that I can adjust some web content dynamically.
    However, I'm getting some strange results back, and wanted to know how I should interpret the result of this method.
    When using SAPGUI for Windows 7.30, with a system defined font size of 9, this method returns:
    90,000
    At first I thought maybe I just need to arbitrarily divide by 10,000 to get the font size in points. 
    However when using SAPGUI for Java on my retina macbook pro, with a system defined font size of 12, this method returns:
    78,545
    Can anyone tell me exactly what this method is returning, and how I can convert it to the actual system font size in points?

    Yes you can't use CL_GUI_FRONTEND_SERVICES from a BSP page.  CL_GUI_FRONTEND_SERVICES using activeX controls running within the SAPGui to perform most of its actions.  Since you have not connection to a SAPGui during a BSP page, you can use this class.
    You might want to look at scripting against the Microsoft FileSystem Object.  There is a size property of both the folder and file object.  A search of Microsoft's website will show lots of documentation on this object and code samples in VBScript and JavaScript.  This does opens up all kinds of security concerns from the browser however.

Maybe you are looking for