Changing the fonts used by the look and feel?

I want to be able to change the font settings for the program I'm writing. Is there any way to do this without writing my own theme and/or LookAndFeel? For example, is there a way to just use the Nimbus Look & Feel, but override the fonts it uses somehow? I've been browsing around and it seems like most solutions are to write your own theme from scratch, which I'd like to avoid if possible (I don't want to change anything else, just the fonts!).
Any help or guidance is very much appreciated. Please let me know if I was unclear.

Thank you both for the links. I realize I didn't ask this initially, and you both answered the question I asked, but I'm actually curious if there's a way to do this consistently across different looks and feels. Just some sort of blanket command that, regardless of what the Look and Feel is, overrides font selections. Perhaps I'm looking for a way to override the mappings of logical fonts? I'm not exactly sure how one would accomplish it.
I don't do this because I want to force the user into using a specific font, but actually I'm trying to add a feature that allows the user to override the Look & Feel's font choices with their own if they so choose.
But I can't control what Look and Feel they're using (well, I can, but I have chosen not to).
Does any of that make sense?
Edited by: Caryy on Sep 21, 2010 11:22 AM

Similar Messages

  • I have a MacBook Pro , Model Identifier MacBook Pro8,2 , MAC OX S 10.7.4 I noticed that if I open Final Cut Projects created on other/older models MacBook Pro Laptops or MacPro Desktops, the fonts used in the previously created FCP projects, change their

    I have a MacBook Pro , Model Identifier MacBook Pro8,2 , MAC OX S 10.7.4
    I noticed that if I open Final Cut Projects created on other/older models MacBook Pro Laptops or MacPro Desktops, the fonts used in the previously created FCP projects, change their font spacing! which distorts the look of the Text that was written, by oevrlapping on other things that were put & present on the screen.. Another similar probelm is that the Vector shaped used for example to highlight certain words or shapes, also change their position on the screen so that they no longer highlight exact things that we once used these vectors to highlight or outline... Anyone knows how to solve this problem please?? I made sure that the same fonts are available in the Library in both old and newer computers...
    thanks in advance..

    You might want to take your question to the FCP forum - if you copied all fonts to your Library>Fonts folder and restarted they should be recognized by all applications. I know that this works for Adobe products, anyway.
    Clinton

  • What is the font used in the buttons in Titanium skin?

    Hello,
    I need to know what the font used for the buttons (Contents,
    Index, etc) in the WebHelp Titanium (RoboHelp 6) skin. I need to
    know because I want to use this skin, and also include a Print
    button.
    Thanks!
    Jennifer Bennett

    Hi Jennifer. If you download the skin and open it in the skin
    editor you'll see the font used next to the "Font" button near the
    bottom r/h/ corner. You can also use the button to change the font
    if you wish.

  • What is the font used at the end of the movie trailer, Blockbuster

    Can anyone tell me the name of the FONT used in the I Movie Trailer called Block Buster?
    I think the opening font says ROADTRIP
    Thanks so much!
    A

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.
    Is this a toolbar?
    *Firefox menu button > Options
    *View > Toolbars (press F10 to display the hidden Menu bar)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to use a thirdparty look and feel

    how to use a thirdparty look and feel
    i download some from
    http://javootoo.l2fprod.com/
    but how to use?

    Include the downloaded jar file in your classpath.
    Then during startup of your application, call UIManager.setLookAndFeel(className) where className is the class name of your Look & Feel

  • Is there anyway to change the font used in the Notes app?

    I noticed Notes's font has changed on my iPhone 3Gs (which I don't like). Is there a way to change it back?
    Thanks,
    Paul

    wjosten,
    Thanks. I didn't think to check for font settings.
    Paul

  • What is the font used in the blockbuster trailer

    At the end of the trailer teplate it says "Road Trip."

    It's a font called "Rainforest Inline". However, I think Apple did some customizing with the red line and textured font look.
    Matt

  • What is the name of the font used by the context menu ?

    I would need this in order to know what Unicode character range is mapped by this font.

    Flash uses the system default font to show context menu . Foe windows 7 i think it should be Sans_Serif.
    Thanks,
    Sudheendra

  • CS2- How to get the fonts used in a document ?

    Hi,
    Can anyone tell how to find the the fonts used in the document directly without iterating through the text art used in the document.BCOZ if i iterate through each text frame or character my plugin works very slowly.I want to speed up the process of finding & replacing the fonts like wat we do manually in the "Type-> Find Font" menu thru my code.
    Please post ur comments on this .If there is no direct option to find &replace the fonts used in the document ,pls let me know the simplest logic of finding & replacing all occurances of a font in a doc so that my process of doing this should be faster.
    Thanks in advance.
    myRiaz

    As far as I know, there's no way to get a list of fonts in use in a document without iterating over the document and compiling a list by asking every piece of art.
    If you want to trigger 'Type > Find Font' there might be a way to invoke that using Actions (AIActionManager.h). I'm not sure if that would help or not though.
    This probably isn't very helpful depending on what you're doing, but I think this is meant to be handled by using character styles. That way you can change a style and update any related text instantly. Not much help though if you're just trying to write a S&R font plugin.

  • [JS][CS4]List fonts used in the Document

    Hi to all scripting gurus,
    I have this following script that returns a list of fonts used in the document:
    function fontused(){               var fontscoll = document.fonts;               for(var i = 0; i < fontscoll.length; i++){                       var font = fontscoll[i];                       alert(font.name);                } }
    The above is working OK my problem is that it also list the fonts used in the placed illustrator files (.eps). Is there some kind of parameter or something that i can use so that it only list the fonts used in the text?
    -CharlesD

    Charles
    Doesn't time fly?
    This will give you the idea, if when you find more exceptions add them in a likewise manner.
    The "if" statements check that tables, headers, etc. exists otherwise an error will be throw.
    Enjoy
    Trevor
    P.s. I had planned on updating the script after David highlighted the problem, just didn't get round to it.
    // Script to find fonts in documents which are not just in content pasted from illustrator file
    // By Trevor http://forums.adobe.com/message/4807396#4807396
    var   myFonts="",
            uniqueFonts = {}, n;
    if (app.documents[0].stories.everyItem().textStyleRanges.length > 0) fontsIn (app.documents[0].stories.everyItem().textStyleRanges.everyItem().appliedFont)       
    if (app.documents[0].stories.everyItem().tables.length > 0) fontsIn (app.documents[0].stories.everyItem().tables.everyItem().cells.everyItem().textStyleRanges.everyItem().appliedFont)
    if (app.documents[0].stories.everyItem().footnotes.length > 0) fontsIn (app.documents[0].stories.everyItem().footnotes.everyItem().textStyleRanges.everyItem().appliedFont)
    for (n in uniqueFonts) myFonts+=(uniqueFonts[n])+"\r";
    alert(myFonts)
    function fontsIn (item)
            var l = item.length;
            while (l--) uniqueFonts[item[l].name] = item[l].name;

  • UIX: change image in corporateBranding dependent on choosen Look And Feel

    Is it possible to change a image used in the corporateBranding dependent on choosen Look And Feel?

    If your corporate branding is an image, you can to bind the "source" attribute and return the appropriate image depending on the laf. You can get the laf off the renderingContext. The data binding chapter is here:
    http://helponline.oracle.com/jdeveloper/help/state/content/vtTopicId./navSetId.jdeveloper/vtTopicFile.jdeveloper%7Cuixhelp%7Cuixdevguide%7Cdatabinding%7Ehtml/navId.4/

  • Problem With ButtonUI in an Auxiliary Look and Feel

    This is my first post to one of these forums, so I hope everything works correctly.
    I have been trying to get an axiliary look and feel installed to do some minor tweaking to the default UI. In particular, I need it to work with Windows and/or Metal as the default UI. For the most part I let the installed default look and feel handle things with my code making some colors lighter, darker, etc. I also play with focus issues by adding FocusListeners to some components. I expect my code to work reasonably well no matter what the default look and feel is. It works well with Motif, Metal, and Windows, the only default look and feels I've tested with. What I'm going to post is a stripped down version of what I have been working on. This example makes gross changes to the JButton background and foreground colors in order to illustrate what I've encountered.
    I have three source code files. The first, Problem.java, creates a JFrame and adds five buttons to it. One button installs MyAuxLookAndFeel as an auxiliary look and feel using MyAuxButtonUI for the look and feel of JButtons. The next button removes that look and feel. The next button does nothing except print a line to System.out. The next button installs MyAuxLookAndFeel as an auxiliary look and feel using MyModButtonUI for the look and feel of JButtons. The last button removes that look and feel.
    The problem is, when I install the first auxiliary look and feel, buttons are no longer tabable. Also, they cannot be invoked by pressing the space button when they're in focus. When I remove the first auxiliary look and feel everything reverts to behaving normally. When I add the "Mod" version, button tabability is fine. The only difference is I've added the following code:
    if ( c.isFocusable() ) {
       c.setFocusable(true);
    }That strikes me as an odd piece of code to profoundly change the program behavior. Anyway, after adding and removing the "Mod" look and feel, the tababilty is forever fixed. That is, if I subsequently re-install the first look and feel, tababilty works just fine.
    The problem with using the space bar to select a focused button is more problematic. My class is not supposed to mess with the default look and feel which may or may not use the space bar to press the button with focus. When the commented code in MyModButtonUI is uncommented, things behave correctly. Even the statement
    button.getInputMap().remove( spaceKeyStroke );doesn't mess things up after the auxiliary look and feel is removed. So far I've tested this with JRE 1.4.2_06 under Windows 2000, JRE 1.4.2_10 under Windows XP, and JRE 1.5.0_06 under Windows XP and the behavior is the same.
    All of this leads me to two questions.
    1. Is my approach fundamentally flawed? I've extended TextUI and ScrollBarUI with no problems. This is the only problem I've encountered with ButtonUI. My real workaround for the space bar issue is better than the one I've supplied in the example, but it certainly is not guaranteed to work for any arbitrary default look and feel.
    2. Assuming I have no fundamental problems with my approach, it's possible I've found a real bug. I searched the bug database and couldn't find anything like this. Of course, this is the first time I've tried seasrching the database for a bug so my I'm doing it badly. Has this already been reported as a bug? Is there any reason I shouldn't report it?
    What follows is the source code for my example. It's in three files because the two ButtonUI classes must be public in order to work. Thanks for insight you can provide.
    Bill
    File Problem.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Problem extends JFrame {
       public boolean isAuxInstalled = false;
       public boolean isModInstalled = false;
       public LookAndFeel lookAndFeel = new MyAuxLookAndFeel();
       private static int ctr = 0;
       public static void main( String[] args ) {
          new Problem();
       public Problem() {
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setSize(250, 150);
          setTitle("Button Test");
          JButton install = new JButton("Install");
          JButton remove = new JButton("Remove");
          JButton doNothing = new JButton("Do Nothing");
          JButton installMod = new JButton("Install Mod");
          JButton removeMod = new JButton("Remove Mod");
          this.getContentPane().setLayout(new FlowLayout());
          this.getContentPane().add(install);
          this.getContentPane().add(remove);
          this.getContentPane().add(doNothing);
          this.getContentPane().add(installMod);
          this.getContentPane().add(removeMod);
          install.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isAuxInstalled ) {
                   isAuxInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          remove.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isAuxInstalled ) {
                   isAuxInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          doNothing.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                System.out.println( "Do nothing " + (++ctr) );
          installMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isModInstalled ) {
                   isModInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          removeMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isModInstalled ) {
                   isModInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          setVisible(true);
       class MyAuxLookAndFeel extends LookAndFeel {
          public String getName() {
             return "Button Test";
          public String getID() {
             return "Not well known";
          public String getDescription() {
             return "Button Test Look and Feel";
          public boolean isSupportedLookAndFeel() {
             return true;
          public boolean isNativeLookAndFeel() {
             return false;
          public UIDefaults getDefaults() {
             UIDefaults table = new MyDefaults();
             Object[] uiDefaults = {
                "ButtonUI", (isModInstalled ? "MyModButtonUI" : "MyAuxButtonUI"),
             table.putDefaults(uiDefaults);
             return table;
       class MyDefaults extends UIDefaults {
          protected void getUIError(String msg) {
    //         System.err.println("(Not) An annoying error message!");
    }File MyAuxButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.plaf.*;
    import javax.swing.plaf.multi.*;
    import javax.accessibility.*;
    public class MyAuxButtonUI extends ButtonUI {
       private Color background;
       private Color foreground;
       private ButtonUI ui = null;
       public static ComponentUI createUI( JComponent c ) {
          return new MyAuxButtonUI();
       public void installUI(JComponent c) {
          MultiButtonUI multiButtonUI = (MultiButtonUI) UIManager.getUI(c);
          this.ui = (ButtonUI) (multiButtonUI.getUIs()[0]);
          super.installUI( c );
          background = c.getBackground();
          foreground = c.getForeground();
          c.setBackground(Color.GREEN);
          c.setForeground(Color.RED);
       public void uninstallUI(JComponent c) {
          super.uninstallUI( c );
          c.setBackground(background);
          c.setForeground(foreground);
          this.ui = null;
       public void paint(Graphics g, JComponent c) {
          this.ui.paint( g, c );
       public void update(Graphics g, JComponent c) {
          this.ui.update( g, c );
       public Dimension getPreferredSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getPreferredSize( c );
          return this.ui.getPreferredSize( c );
       public Dimension getMinimumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMinimumSize( c );
          return this.ui.getMinimumSize( c );
       public Dimension getMaximumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMaximumSize( c );
          return this.ui.getMaximumSize( c );
       public boolean contains(JComponent c, int x, int y) {
          if ( this.ui == null ) {
             return super.contains( c, x, y );
          return this.ui.contains( c, x, y );
       public int getAccessibleChildrenCount(JComponent c) {
          if ( this.ui == null ) {
             return super.getAccessibleChildrenCount( c );
          return this.ui.getAccessibleChildrenCount( c );
       public Accessible getAccessibleChild(JComponent c, int ii) {
          if ( this.ui == null ) {
             return super.getAccessibleChild( c, ii );
          return this.ui.getAccessibleChild( c, ii );
    }File MyModButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.plaf.*;
    public class MyModButtonUI extends MyAuxButtonUI
       static KeyStroke spaceKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0 );
       public static ComponentUI createUI( JComponent c ) {
          return new MyModButtonUI();
       public void installUI(JComponent c) {
          super.installUI(c);
          c.setBackground(Color.CYAN);
          if ( c.isFocusable() ) {
             c.setFocusable(true);
    //      final JButton button = (JButton) c;
    //      button.getInputMap().put( spaceKeyStroke, "buttonexample.pressed" );
    //      button.getActionMap().put( "buttonexample.pressed", new AbstractAction() {
    //         public void actionPerformed(ActionEvent e) {
    //            button.doClick();
    //   public void uninstallUI(JComponent c) {
    //      super.uninstallUI(c);
    //      JButton button = (JButton) c;
    //      button.getInputMap().remove( spaceKeyStroke );
    //      button.getActionMap().remove( "buttonexample.pressed" );
    }

    here is the code used to change the current look and feel :
    try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
             catch (InstantiationException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (ClassNotFoundException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (UnsupportedLookAndFeelException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (IllegalAccessException e)
                  System.out.println("Error occured in .. " + e.toString());
             Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
             Fenetre fen = new Fenetre();
             fen.setSize(dim.width, dim.height);
             fen.setResizable(false);
                 fen.setLocation(0, 0);
                  fen.setVisible(true);

  • Can i perform SDK 7 Compilation while maintaining SDK6 look and feel for my App

    In our organization we test the App using visual specs and our existing visual specs are aligned with SDK 6 look and feel. When i compile my app with SDK 7 the visual display of the App changes completely and is no longer in sync with the visual specs used for testing. As SDK 7 compilation is a mandate for post Feb 1 submission, is it possible to compile the code with SDK 7 while maintaining SDK 6 visual look and feel?

    What i am actually trying to do is to maintain the existing SDK6 UI Look and Feel on iOS7. Apple has issued a mandate to have all Apps compiled with SDK7 for App Store submission post Feb1, 2014. If i compile with SDK7, even if i set the deployment target as iOS6, when my app runs on iOS7 it will have the new Apple's iOS7 look and feel. How can i accomplish this?

  • How can I include a JSP, Maximized, and retain look and feel(WSRP)

    I have created a page group and defined a root page with a certain look and feel. There are two portlets on the page. Once the user clicks on a submit button, the portlet performs some action and includes a jsp included in the EAR file. The portlet needs to maximize the UI to display the jsp correctly.
    Once control returns back to the screen, the look and feel is lost and uses Oracle's default style. I have two questions:
    1. From the portlet, how can I retain the look and feel of the page group when referencing "external" jsp (i.e JSPs in the deployed portal EAR file).
    2. How can I "redirect" the user to the home page in a standard way? If there is not a standard way, how do I use the Oracle specific utilities to do it?
    All of my JSPs are developed externally out of the scope of the Oracle Portal.
    Environment - Oracle Portal 10.1.4 on Release 2 using WSRP to contact Oracle Release 3, hosted EAR file (WSRP Producer).
    Thanks in advance.

    Hi José,
    I don't think that is possible. But you can import the css files that ep uses for its look and feel and try to give your web pages similar look and feel. The tables and other controls used in EP are totally different and are done through complex JavaScript coding instead of simple HTML tags. If you want exact lok and feel then i thin you must go for a Webdynpro based application rather then a J2EE application with JSPs.
    Regards,
    Guru.
    PS: Give points for helpful replies.

  • How can I include a portal component look and feel in a java servlet

    Does any body know how can i include a portal component look and feel (tables, buttons, etc) in a java servlet?

    Hi José,
    I don't think that is possible. But you can import the css files that ep uses for its look and feel and try to give your web pages similar look and feel. The tables and other controls used in EP are totally different and are done through complex JavaScript coding instead of simple HTML tags. If you want exact lok and feel then i thin you must go for a Webdynpro based application rather then a J2EE application with JSPs.
    Regards,
    Guru.
    PS: Give points for helpful replies.

Maybe you are looking for

  • Horizontal scroll bar in OAF screen flexible layout

    Hi Gurus, We have developed an OAF screen using flexible layout. Currently we have two tabs showing in the same window. We are unable to increase the number of columns in the result table of the flexible layout as there is no horizontally scroll bar

  • Function/Procedure help - just want to build simple query and show results

    I'd like a simple "histogram" function - perhaps there is one built-in I'm not aware of. I just want to count discrete values of a column. So I'm constantly writing queries of the form: select column_name, count(*) from table_name group by column_nam

  • Design flaw in MAC OS X "smart folders" system resulting date lose

    Hello there ! I would like your opinion on that issue. This is how I discovered it : many, too many friends who switched to Mac reported me loss of iPhoto pictures with a question mark instead of the picture and "corrupted" iPhoto library. Is been mo

  • OPatch failed with error code =1

    I am installing OBIEE 11g on a WIN XP VM - 32bit, 2gb RAM.Configuration process failed with the following msg. I set OPATCH path in the environment variables and continued with the installation and it still fails. Appreciate any/all suggestions. [201

  • Where do I find the list Adobe-certified cards

    Hi I am looking over the specs for Pro CS4 and it says "For SD/HD workflows, an Adobe-certified card for capture and export to tape". But there is no link to any Adobe-certified list, and I can't seem to find it anywhere. Can someone provide a link.