Problem with font logical names method

Concerning font logical names, the Java tutorial states: To get the logical name for a Font object, call java.awt.Font.getName. Would someone kindly offer a few lines of code to demonstrate how getName would be implemented in this regard -- say using Century Gothic as the font? I've been having trouble overcoming error messages trying to implement this.
Thanks.
Jody Widelitz

Pretty simple, just call getName() on a Font object once you have it. For example, this will list all the font names on your system:import java.awt.*;
public class Test
    public static void main(String[] args)
        Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
        for(int j = 0; j < fonts.length; j++)
            System.out.println(fonts[j].getName());
}

Similar Messages

  • Problem with font-family name

    I have adobe Univers LT Std font purchased and installed on my PC, but there is a problem when I try to use it on the webpage. The font has otf format. I noticed that Chrome and FireFox use different font-family names for this font. FireFox 25.0 seems to use OT Family name (Univers LT Std) as a font-family value, and Chrome 30 uses PS font name (UniversLTStd). So I ended up writing my css like this:
    p {
    font-family: UniversLTStd, Univers LT Std;
    Is there a way to avoid writing multiple family names for a single font to work in different browsers?
    I've checked the font's attributes with FontLab Studio:
    Basic set of font names:
    Family name: Univers LT Std 55
    PS font name: UniversLTStd
    Full name: Univers LT Std 55 Roman
    Menu name: Univers LT Std 55
    FOND name: Univers LT Std 55
    OpenType-specific names:
    OT Family name: Univers LT Std
    OT style name: 55 Roman
    Mac name: Univers LT Std 55
    But didn't find any universal name to use as a font-family.

    Hello Ragu,
    Newly created font family for FR is ZNGO (Similiar to Gothic font). I can see this font family via SE73.
    If I execute the script for FR language output is porpor.
    Now, we have added 2 more countries UK and Germany. So client wants ouput exactly in the same way as that of FR. So I am using ZNGO in paragraph formats. But output for FR an EN doses not contain this font family. I think when script is called in EN and DE language, somehow it does not detect ZNGO font family.
    So my question is (again) whether font famliy is langauage dependent? If yes, then how to change/view languages for font family. is there any option in SE73 or any other transaction? If not, then why am i facing this problem?
    Anup

  • Problem with font size, not showing up as expected.

    I've been wrestling with this for a few weeks now, but surely must be getting closer to having it resolved. It's just a problem with font size on just this one page.
    http://www.kgngroup.net/logos_and_packaging.html
    I want the body text to be 10px, but after two weeks, have played with every conceivable way, altering body font size in CSS and in the document itself. I've viewing it in Safari but others on Windows machines tell me that it is out of whack also.
    My main problem is that I can change the font size to extremes but it still shows up as the same size in the browser (about 12px.) I know changes can be made because I can modify the wording and that does change online. It's just a problem with the font size. Oh, and in the third column, the one to the right, in Dreamweaver, the font looks like it is miniscule, cannot even be read, but in the browser, since the style11 is applied, all three columns look equal size.
    Not sure where to go from here. I just want to get the body font down to 10 pixels.
    TIA,
    Ken

    John Waller wrote:
    I guess this a follow up to your earlier thread
    http://forums.adobe.com/message/3627681
    What would really help you in diagnosing issues such as this is to install the Firebug add-in for Firefox (as suggested in the earlier thread).
    Firebug shows you visually what CSS rules apply to whatever element you click on the screen.
    In this case, you have a confusion of CSS font sizes cascading on top of each other and that's confused again by mixing units for no real reason. .style11 is unnecessarily applied to lots of individual <p> tags. Remove those classes and delete the rule.
    e.g.
    The tiny font in the RHS column is affected first by
    .style8 {
    font-size: 0.5em;
    affecting the <td> then by
    .style11 {font-size: 75%}
    affecting the <p> tag.
    End result = tiny text (approx 2px).
    In these cases of mass confusion, my approach is to strip out all font sizing from the CSS and start over.
    Avoid %. Use px.
    Apply font sizing rules logically starting from the <body> tag downwards.
    That'll give you a solid baseline without weird effects.
    Ah, I find your answer worth repeating.
    Very cool that you have diagnosed so well and spelled it out here.
    I will get the Firefox add-on you mention, plus, print out this response and follow it like a recipe.
    It makes perfect sense and you have saved me from the 'clutter' of being wound up in too many directions with this because I could not make all of the connections that you have done here. I appreciate your help very much.
    Thank You,
    Ken

  • Problem with looping logic

    Hello all,
    Ok reposted using code tags, sorry about that.
    I'm trying to write some code to take in a 2D int array, loop through the array to identify where certain blocks of numbers begin and record that location so that I an jump straight to it at a later time. The number blocks go up iteratively from a point from 0 to 9 and are surrounded by nodata values(-9999).
    The problem is that when I print out the numbers they are only being recognised up to 6 (7th number) and when I check the locations against the original text file they dont match. I think it's just a problem with my logic but I'm not sure why.
    The text file is converted to ints and placed in an array from a buffered file reader in a seperate class. I can put this up if needed.
    Any help would be much appreciated.
    Thanks.
    Duncan
    *  Class imports text file which contains a collection of values, either nodata(-9999) or a location
    *  represented by numbers moving away from a point; 0 closest then 1, then 2 etc.
    *  records the first location of each number to avoid having to loop through the whole file each time.
    *  i.e. can later jump straight to the first recorded location of each number.
    *  In current text file there are 10 numbers(0 - 9) but for some reason it stops finding them after
    *  6(seventh no.) and having checked the location values against the original text file these are wrong
    *  by a fair way as well.
    import java.io.*;
    //import java.awt.*;
    //import java.awt.event.*;
    public class Hydrograph {
         int width = 0;
         int height = 0;
         int dZeroC, dZeroD = 0;
         int dOneC, dOneD = 0;
         int dTwoC, dTwoD = 0;
         int dThreeC, dThreeD = 0;
         int dFourC, dFourD = 0;
         int dFiveC, dFiveD = 0;
         int dSixC, dSixD = 0;
         int dSevenC, dSevenD = 0;
         int dEightC, dEightD = 0;
         int dNineC, dNineD = 0;
         public Hydrograph() {
              /* Ignore this bit it's being used for something else
              //File file = new File("c:/Users/Duncan/Documents/MODULES/MSc Dissertation/Code/A1.txt");
              //File file = new File("M:/java/code/A1.txt");
              ArrayRead ar = null;
              ar = new ArrayRead(file);
              int rows = ar.getRows();
              int columns = ar.getColumns();
              int steps = ar.getSteps();
              int[][][] threeDIntArray = ar.getThreeDIntArray();
              // Creates a new instance of delay class which takes in a text file and converts
              // it to int form, placing it into a 2D int array.
              Delay dLay = null;
              dLay = new Delay();
              width = dLay.getWidth();
              height = dLay.getHeight();
              int[][] twoDDelayFile = dLay.getTwoDintArray();
              int delayCount = 0;
              // Loops through 2D int array to identify when number first equals 0, then passes
              // the height and width values to storeDelayPos method below. Then finds for 1, 2
              // 3, 4,...etc by adding 1 to delayCount.
              System.out.println(" ");
              for (int a=0; a<width; a++) {
                   for (int b=0; b<height; b++) {
                        if (twoDDelayFile[a] == delayCount) {
                             int c, d = 0;
                             c = a;
                             d = b;
                             storeDelayPos(c, d, delayCount);
                             System.out.println(delayCount);
                             delayCount++;
                             break;
                   //System.out.println(" ");
              System.out.println(" ");
              System.out.print(dZeroC + " " + dZeroD);
              System.out.println(" ");
              System.out.print(dOneC + " " + dOneD);
              System.out.println(" ");
              System.out.print(dTwoC + " " + dTwoD);
              System.out.println(" ");
              System.out.print(dThreeC + " " + dThreeD);
              System.out.println(" ");
              System.out.print(dFourC + " " + dFourD);
              System.out.println(" ");
              System.out.print(dFiveC + " " + dFiveD);
              System.out.println(" ");
              System.out.print(dSixC + " " + dSixD);
              System.out.println(" ");
              System.out.print(dSevenC + " " + dSevenD);
         // Takes in width, height and delayCount value and sets variables according to
         // the value of delayCount.
         void storeDelayPos (int setC, int setD, int setDCount) {
              int dCount = 0;
              dCount = setDCount;
              switch(dCount) {
                   case 0:
                        dZeroC = setC;
                        dZeroD = setD;
                        break;
                   case 1:
                        dOneC = setC;
                        dOneD = setD;
                        break;
                   case 2:
                        dTwoC = setC;
                        dTwoD = setD;
                        break;
                   case 3:
                        dThreeC = setC;
                        dThreeD = setD;
                        break;
                   case 4:
                        dFourC = setC;
                        dFourD = setD;
                        break;
                   case 5:
                        dFiveC = setC;
                        dFiveD = setD;
                        break;
                   case 6:
                        dSixC = setC;
                        dSixD = setD;
                        break;
                   case 7:
                        dSevenC = setC;
                        dSevenD = setD;
                        break;
                   case 8:
                        dEightC = setC;
                        dEightD = setD;
                        break;
                   case 9:
                        dNineC = setC;
                        dNineD = setD;
                        break;
                   default:
                        System.out.println("OUT OF BOUNDS");
                        break;
         public static void main (String args[]) {
         new Hydrograph();

    Hi,
    I am working on a hydrograph program in java as well... I am trying to represent rainfall data. Do you think that you could share some of the code that you came up with, so that I don't have to go through the whole process.
    thank you so much,
    Kevin

  • Problems with song's names in iTunes Store

    So, I have a problem with song's names in iTunes Store on my iPhone 6+ 128. with 8.2
    You can see it on attached screens.
    I tried to change the font size and erase the phone and then install it again by default. The problem manifests itself on 6+ and didn't on my iPad with the same program version.

    That's really curious. Sorry I don't have anything else by way of potential solutions to offer, but it may be worth contacting Apple about this one.
    http://www.apple.com/support/contact/

  • What is the problem with fonts changing to myriad pro? Is this problem ever going to be resolved? Its driving me mad!

    What is the problem with fonts changing to myriad pro? Is this problem ever going to be resolved? Its driving me mad!

    Browser Dog, Amy,
    The default font remains Myriad Pro until you change it, either in the RGB/CMYK Startup files or in the preferences, options depending on versions.
    Concerning missing font names, I believe this may solve it:
    Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
    It was first presented in this post #15 by TheUlser:

  • Problem with fonts display in safari and mail ???

    hello !
    sometimes i have problems with fonts display
    safari use a mathematics font instead of my preferences fonts
    i have to copy-paste in a text-editor to see the right font !!!
    i have the same problems sometimes in mail
    is anybody have infos about that problem ?
    thanks !
    p.s. mail version 1.3.11 - safari version 1.3.1

    OS X cocoa apps like Safari and Mail don't like non-Unicode fonts using common names that replace Latin with symbols or other scripts. Helvetica Fractions and Times Phonetic are common culprits. You need to remove such fonts to solve the problem.

  • I have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

  • Error message in time machine: "There was a problem with the user name or the password of the network

    I have been unable to back up my macbook to my time capsule for some time now. I received the following error message (translated from Swedish) when trying to back up using time machine:
    "The network's volume could not be placed on the desktop. There was a problem with the user name or the password for the network.
    Open system preferences and go to Time Machine. Select the volume for security backup again and state the correct user name and password."
    I have confirmed the network password, and also tried with resetting the password. I have not idea what else to do. Any help is much appreciated.
    Best regards,
    John

    I have been unable to back up my macbook to my time capsule for some time now. I received the following error message (translated from Swedish) when trying to back up using time machine:
    "The network's volume could not be placed on the desktop. There was a problem with the user name or the password for the network.
    Open system preferences and go to Time Machine. Select the volume for security backup again and state the correct user name and password."
    I have confirmed the network password, and also tried with resetting the password. I have not idea what else to do. Any help is much appreciated.
    Best regards,
    John

  • Problem with Connection Broker name

    Hi,
    When i change the connection broker name using for example:
    Set-RDClientAccessName -ConnectionBroker serverbrokerName.domain.com -ClientAccessName NewBrokerName.domain.com
    no.manchete.pt
    And setup a DNS pointing to NewBrokerName.domain.com
    When someone tries to connect it gives him the following error:
    "Your computer cannot connect to the remote computer because the Connection Broker couldn't validate the settings specified in your RDP file. Contact your network administrator for assistance".
    What am i doing wrong?
    Sincerely,
    AM

    Hi,
    When i change the connection broker name using for example:
    Set-RDClientAccessName -ConnectionBroker serverbrokerName.domain.com -ClientAccessName NewBrokerName.domain.com
    no.manchete.pt
    And setup a DNS pointing to NewBrokerName.domain.com
    When someone tries to connect it gives him the following error:
    "Your computer cannot connect to the remote computer because the Connection Broker couldn't validate the settings specified in your RDP file. Contact your network administrator for assistance".
    What am i doing wrong?
    Sincerely,
    AM
    The services needed to be restarted, now im facing another problem with the new name:
    error: "Remote Desktop can't connect to the remote computer "NewBrokerName.domain.com" for one of these reasons:
    1) Your user account is not listed in the RD Gateway's permission list.
    2) You might have specified the remote computer in NetBIOS format ( for example, computer1), but the RD Gateway"
    EDIT: Also solved this error RD Gateway was only allowing connections to Domain Computers, change to all resources

  • Having problem with change of name in the datagrid Coding

    I am having problem with changing the name of the datagrid header text name for one of the data either in the flash file or the php file.
    The thing is i want to change the Course_Name to Course Name that has no underscore so that it will look nicer in the datagrid but if I change it in the php file like SELECT Course_Name as 'Course Name' ....., it will not turn out in the datagrid when I CTRL ENTER the flash file but the others like Price,description and display is shown.
    There is no problem with my php code but I do not know how to change the Course_Name into Course Name so please help me resolve this error that I am having.
    This is my flash code
      function goCourse(e : MouseEvent):void
      gotoAndStop(5);
      refreshResponder = new Responder (refreshSuccess, onFault);
      connection = new NetConnection ();
      connection.connect (gateway);
      dataDG.addEventListener (Event.CHANGE, gridItemSelected);
      refreshData (true);
      function gridItemSelected (e: Event): void {
      ID = e.target.selectedItem.ID;
      courseTxt.text = e.target.selectedItem.Course_Name;
      priceTxt.text = e.target.selectedItem.Price;
      descTxt.text = e.target.selectedItem.Description;
      private function getParams () {
      var param: Object = new Object ();
      param.ID = ID;
      param.Course_Name = courseTxt.text;
      param.Price = priceTxt.text;
      param.Description = descTxt.text;
      return param;
      private function refreshData (refresh: Boolean): void {
      if (refresh)
      connection.call ("Course.viewCourse", refreshResponder);
      private function refreshSuccess (result: Object): void {
      dataDG.dataProvider = RecordSetDP.toDataProvider (result);
         dataDG.columns = ["Course_Name","Price","Description","Display"];
      private function onFault (fault: Object): void {
      trace (String (fault.description));
    This is my php file code.
      function viewCourse()
      $this->connect();
      $sql = "SELECT Course_Name,Price,Description,Display
      FROM coursetb";
      return mysql_query($sql,$this->_connection);

    i don't see where you're calling your php file in your code, but change 'Course Name' to 'Course_Name' (or vice-versa) there.

  • Workflow 2.6.3.5  - Problems with font in OA

    I have some problems with fonts in Oracle Workflow: i created a process in wf builder and a package that start the process..in the package i put a text body for the notifications with 'b' and '/b' but when i read the notification in workflow manager i cant see the bold font!! Anyone can help me?? I suppose that this problem is linked with HTML code that has to be set in some preferences menu, but i cant find it..but it may be another reason!
    Another problem that i have is that i cant disable the history window in the notification (even adding to the message the attribute #HISTORY)..
    THX for your help
    Jac ;)
    Message was edited by:
    JaCoRoBo

    1. I am unable to understand the first problem. Please note that if you want to display HTML formatted content, you will have to use one of the following options.
    PLSQL Documents - 32K size limit
    PLSQLCLOB Documents - CLOB
    Embedded Fwk Regions - Only in Oracle Applications
    If you are specifying HTML content within Item Attributes that you want to be eventually displayed in the notification the HTML tags could be decoded and displayed as is without formatting.
    2. There is no documented way to disable the Default Action History within the notification body. You may define the Document type message attribute #HISTORY, assign a PLSQL Document API to it and return null from the Document code. This should hide the action history.
    Hope this helps.
    Vijay

  • Hi, I have a problem with fonts because in the window I can't see the font, they are transparent. how can I fix this?

    Hi, I have a problem with fonts because in the window I can't see the font, they are transparent. how can I fix this?

    giadad,
    It sounds as this issue:
    Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
    It was first presented in this post #15 by TheUlser:
    https://forums.adobe.com/message/6854594#6854594
    It has been described on this Adobe page:
    http://capitalmacservice.com/font-preview-working-illustrator-cs-5-yosemite-fix/

  • Help me, I have a problem with font when export report to PDF?

    Hi everyone! Help me
    I have a problem with font when export report to PDF
    My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
    when desige template no problem, error only happen when view report by PDF.
    Edited by: user10236405 on Oct 15, 2008 11:23 PM

    give it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.

  • No persistent store with the logical name could be found on the server

    Weblogic 10.3.6 standalone server (no cluster).
    I want to move ejb timers persistence from the default store to DB.
    I created a new data source, non-XA, global transactions not supported, targeted to my managed server. Tested configuratiion against DB: OK.
    I created a JDBC persistent store (type JDBCStore), attached it to data source, targeted to my managed server, committed changes OK.
    In my application, TimedObject is implemented by a Stateless Session bean.
    I modified the weblogic-ejb-jar.xml descriptor for my SLSB specifying the persistence store name:
    <stateless-session-descriptor>
                <timer-descriptor>
                    <persistent-store-logical-name>MyStore</persistent-store-logical-name>
                </timer-descriptor>
    When I deploy my application, I get the following error
    [EJB:011112]Error initializing the EJB Timer store for the EJB '...' The weblogic-ejb-jar.xml deployment descriptor or annotation for this EJB contains a persistent-store-logical-name setting but no persistent store with the logical name 'MyStore' could be found on the server 'yyyy'.
    Why ?

    Hi JB,
    The OTM schema has been created on an external database and not on the embedded XE database. Using 'Oracle Application Testing Database Configuration' we were able to successfully configure the said DB. We are able to use OTM through the 'Oracle Test Manager - Win32 Client' also. We are being held up by the above error when we attempt to deploy and use the server based OTM application.
    Do we need to configure the above Schema under the Weblogic console also?
    Regards,
    Aniket.

Maybe you are looking for