What is font metric ?? (HELP)

hi, i am currently doing my project using java... 1 of the features in my system is the changing of font type and size of selected text... however my teacher wants me to make use of font metric (hope i never spelled wrongly)...
can someone tells me wat is font metric ? and any examples to show??
i appreciate all helps....

The following code should get get the height and ascent of the font of any componant or object that inherits from componant. (I haven't compiled or run this code so it may contain errors)Componant yourComponant = new Componant();
Font yourFont = yourComponant.getFont();
FontMetrics yourFontMetrics = getFontMetrics(yourFont);
int fontHeight = yourFontMetrics.getHeight();
int fontAscent = yourFontMetrics.getAscent();fontHeight contains the height of a line of text in this font.
fontAscent contains the the ascent of this font (from baseline to the top of most characters).
Follow the link in the last post to see all the methods and what they do.

Similar Messages

  • Cannot Read Font Metrics Issue on Save As PDF

    Hi All
    On saving a document as PDF, the FrameMaker Console displays the message:
    The font file may be damaged.
    maker: Cannot read font metrics from font file named Tahoma-Bold.
    The PDF is created but it contains squares in place of letters.
    This only happens for one document within my book.
    I have removed and reinstalled Tahoma, with no effect.
    What has happened and what do I need to do to enable save to PDF for this document.
    I am using FrameMaker 9.0 installed as part of Technical Suite 2 and running on Windows 7 professional.
    Thank you for your help.
    Claire

    I'm on FrameMaker 10, installed about a month ago, and suddenly, yesterday, I started getting this exact error on PDFing a book I'd previously had no trouble with. Nothing apparently changed in my setup between everything working fine and getting these "the font file may be damaged" console errors. Interestingly, it's on exactly the same font as reported by Claire and MichaelH; Tahoma and Tahoma-Bold are listed as the troublesome fonts. These are not the commonplace Frame console "missing font" errors -- they totally mess up the PDF.
    Both these fonts work perfectly in Word. We tried reinstalling, with no change, and I was about to call Adobe support, as recommended by our IT desk, but checked this forum first.  A million thanks, Michael Müller-Hillebrand, for posting the exact solution to the problem. I cleared the Convert CMYK to RGB box and everything is fine now. Thank you SO much.
    Adobe, could you please fix this? First message on this thread was almost a year ago and my copy of Frame was purchased last month. The issue should have been fixed by now. This has cost me about three hours, plus the time of the IT desk reinstalling FrameMaker.

  • Sapscript font metrics generate AFM file howto

    Hi scripters,
    I'm creating an 11pt font for HPLJ5SI.
    In SE73, I created new system fonts HELVE 110 normal, bold and so on.
    Then SE73 printer fonts for ZHPLJ5SI, same as system fonts. All other HELVE and TIMES fonts have AFM set for cpi. The fontmetrics are displayed as (i.e.( "sapLinkToAFM HPLJ5SI HELVE 100 false false".
    I created (also in SE73) new print controls; I derived the correct value comparing the respective HEX strings for 10 point and 12 point HELVE.
    I tried "sapLinkToAFM HPLJ5SI HELVE 110 false false" but this does not generate.
    Now I used the same definition as for 10 points. The output looks fine but I have doubts about the character spacing: It looks different from what I print from MS Word ARIAL.
    I remember there is a (DOS) program to generate font metrics but I forgot the details; Note 12462 does not really help.
    I would appreciate a step-by-step guide or a link to a good description.
    Best Regards,
    Clemens Li

    Hi,
    Are you trying to generate a PDF file or print to a printer. It is not a good idea to try adding HELVECYR to device type PDF1. You should create the PDF via a device type that supports Cyrillic characters like SAPWIN or SAPWIN5. Also you need to upload true type fonts that support the cyrillic charcters as described in SAP note 322998.
    Alternatively if you have a unicode system, you can use unicode device type PDFUC. It is still necessary to upload true type fonts that support the cyrillic charcters. See SAP note 999712.
    regards,
    Aidan

  • Does anyone know what this font is called, used in FCP??

    Hi, does anybody know what the font in the picture below is called?? I see it used alot in videos made in FCP, for example i recently saw it used in the VOYR.com behind the scenes stuff for Kanye West and Jay-Z's tour....i think Kanye also uses it in some album artwork.....
    Ive also seen it used in a few different music videos aswell...
    Many thanks
    S

    It looks a lot like Helvetica Neue Condensed Black.  I am no expert, but the "O" makes me think it is condensed and the "W" makes me think that it is black.  It could also be a futura or franklin gothic font variation as well, although the "O" doesn't really look futura.
    Maybe this link can help you select the right font. 
    http://www.myfonts.com/fonts/adobe/helvetica-neue/
    http://www.myfonts.com/search/%28Franklin+gothic%29/fonts/
    http://www.myfonts.com/search/Futura/fonts/
    Myfonts is a pay site, but once you nail down what font you want, I would do a google seach to find it for free.
    Hope this helps a bit.  If I am not 100% correct on this answer, I'm sure that any one of these font variations could work in its place either way.
    Good luck to you,
    ~ G.K.

  • What default font is being used for skin tooltips in captivate 6.0

    What default font is being used for skin tooltips in captivate 6.0

    Hi SRINIVAS 
    I am using this configuration:
    Device Type: SAPWIN :Rel.4.x/SAPIpd 4.09+ ONLY!
    Device Class: Standard Printer
    Access Method: F: Printing on Front End Computer
    Host Printer: __DEFAULT
    Please reward points if helpful
    Regards
    Edited by: Eydar Del Angel on Feb 6, 2008 12:49 PM

  • Font Metrics, Completely Wrong Values

    So what's the deal with font metrics?
    The values it gives are completely wrong.
    For example with a monospaced font i printed out every single
    character on screen (upper, lower, 0-9, symbols).
    The font metrics were:
    ascent: 17
    descent: 5
    height: 22
    leading: 0
    Im trying to find the correct ascent. The REAL ascent is only 10.
    The font metrics value is off by 70% and it usually is off by a lot for
    all the fonts ive tried. The descent is off by 2 which isnt bad i guess.
    Anyone know how to get the ACTUAL size?
    in this picture the ascent is high but in my experience it is much higher:
    http://www.devx.com/Java/Article/7932/1954?pf=true

    The Line and Font Metric units are pixels not points.
    That applet doesnt work.
    Any attempt to use the "patch" results in:
    Exception in thread "AWT-EventQueue-2" java.lang.NoSuchMethodError: gui.PatchFontMetrics.patch(Ljava/awt/FontMetrics;)Lgui/PatchFontMetrics;
         at test.FontInfo.describeFont(FontInfo.java:56)
         at test.FontInfo.handleEvent(FontInfo.java:77)

  • How to obtain font metric?

    Hi all,
    I want to obtain a font metric of each character in font (i.e. detph, height and width). Does anybody know how?
    thanks

    Hi Lukas,
    I think what you are looking for may be found in IFontInstance. Have a look at the SingleLineComposer sample in the SDK. Particularly SLCTextGlyphNode.cpp could have something that will suit your needs. While it's not as easy as something like GetFontHeight() would be, it should get you what you need after you have the right glyph ID.
    Best regards,
    Art

  • Inconsistent font metrics

    I am printing a report. For each page, I go through all the text that I want to print on that page using FontMetrics.stringWidth to determine how much space the string will take, and using this information to make decisions about spacing and layout. Then I make a second pass through all the Strings where I actually print them. I do a stringWidth on each String again in this second pass to make final decisions about placement.
    And here's the strange part: When I do the second stringWidth, I sometimes get a different value than I did from the first stringWidth! Even though the difference is just one or two percent, this messes up my calculations, because I had this silly idea that the width of the String would be the same no matter how many times I ask.
    Slightly subtracting from the strangeness: When I begin the page, I create all the Fonts I will need, and then I do a Graphics.getFontMetrics(font) to get a FontMetrics object for each, which I use in the first round of calculations. When I get to the second round of calculations, I have now done a setFont() of the appropriate font, and then I do a getFontMetrics with no parameter to get the font metrics for that font. So it's a different FontMetrics object, but its for the same Font on the same Graphics. Shouldn't they be identical? (I am quite sure that the Font is the same in both cases.)
    I can work around the problem by saving the FontMetrics object I get the first time and just using it again the second time. (I suppose it would be better still to save the size and thus save the redundant calculation, but that would be a pain.) But I would like to understand what is going on. Any words of wisdom?

    I've never been working much with font metrics however i'm aware drawing in java has some incoherencies, like if you draw a hollow circle and a filled circle with the same coords they won't have the same size, etc. you should keep the same values or access the font metrics the same way twice. otherwise, i can't see... you can just keep an array ndicating the size of each line, etc.

  • Obtaining/Exporting Font Metrics through a Script

    I have a Text Layer consisting of characters with varying font metrics (say Font Height, Typeface, Kerning, Leading etc). Am unable to export out the Font metrics through an AE script.
    I was able to get the Font Name, Height, Fill and Stroke properties of the first character from the Text Document.
    var textDoc = layer("sourceText") ;
    var textDef = textDoc.valueAtTime(0, false) ;
    I was able to get the Font Name, height, justification, fill and stroke properties from textDef.
    But, I have no clue about getting the other properties like Kerning,  Leading, Tracking etc.
    It will be ideal if I can get all the concerned font metrics of each character in the Text Layer (separately).
    Thanks in advance.

    Unity used to have this wonderful voting system for feature requests.  So users could simply spend votes on those things that they ageed were needed/desirable in future versions.
    This process is GREAT for end users, as we can all see what everyone else is thinking about... and have others see what we're thinking about in terms of features.
    If we're all similarly frustrated by something, we can publicly draw the attention of other users, and the developers, to that issue/desire/need.  And it gets done faster, more transparently, and everyone is happy.
    Adobe, being Adobe, doesn't want anyone to know what anyone else finds as limited, missing, necessary, desirable, etc... because they don't want to be held accountable for their products by their users.
    But I agree, access to text's metrics/properties is an essential next and incredibly logical step for AE. 
    However blindly hoping others will know where to look (in scripting) for the ability to look at text metrics to do something like create styles is really pulling the wool over the eyes of users.
    And... let's be honest... why does it matter what users want... they're already using AE.  The real voice is new potential users, someone that Adobe spends all their time telling that Illustrator and Indesign are optimised, rather than figuring out how to add common sense functionality to AE.
    Never mind...
    The world still turns.

  • My Mac is doing strange things: delaying between users, mouse flickering and bouncing, gets stuck with rainbow wheel flickering. I ran the appel hardware test and it detected an error: 4MOT/4/40000003:HDD-1233 Does anybody know what that means? HELP!

    My imac is doing strange things:
    -delaying between users: when closing session it goes to blue, then takes a while to appear users signin box, and then wont recognize mouse command to enter until a couple of minutes later... then everything seems alright until....
    -it gets stuck between things, the rainbow wheel appears and its just delays there forever....
    -and every now and then the mouse starts flickering and bouncing wildly onscreen.
    I ran the appel hardware test and it detected an error:
    4MOT/4/40000003:HDD-1233
    Does anybody know what that means? HELP!

    WZZZ answered about where to get iStat. And do check the SMART status. If it is an overheating problem due to a fan or logic board problem, your hard drive is possibly cooking itself to death. If so it isn't a faulty hard drive even though the hard drive might fail. So assuming it's a temperature problem, even if you are able to repair things on the disk with software, that is working on symptoms, not causes. I could be wrong however.
    RE: AppleCare: Your iMac came with one year of AppleCare (Apple's warranty program), but within the first year you can buy 2 more years. You have to extend by the one year anniversary of purchase of the computer. Your 10,1 is too old to still be in the first year, and since you asked what it was, I'm sure you don't have it. Bottom line meaning is that whatever this problem turns out to be, you'll have to pay for it. Unless there is something like this. It is for 2011 iMacs with certain Seagate drives. You can put in your serial number for fun, but it looks like yours is too old. Lastly, some people have had Apple help them anyway if it is just out of warranty, but many have not. Your machine is one of these. Type in 10,1 in the search box. Is there an Apple Store near you? Just b/c it's out of warranty doesn't mean you shouldn't have it looked at by Apple. But no one here can say at all what Apple will or will not do.
    Hope you get it taken care of!

  • Am getting message from MacPro that my start up disc is full - but I can't find it and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files. help?

    I am getting message from MacPro that my start up disc is full - but I can't find this "start up disc" and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files and material that I should toss in the trash, but it is not clear to me  what items I can toss and which items I can't toss. Can you help? Using the imovie "help" support the system showed me under the menu item "go" where the "start up disc" should be - but that wasn't actually available on my menu!  Thanks for your help!

    Disk Utility 
    Get Info on the icon on Desktop
    Try to move this to the MacBook Pro forum
    Your boot drive should be 30% free to really perform properly. 10% minimum
    Backup, clone, use TimeMachine, use another drive for your projects and movies, replace and upgrade the internal drive even.

  • When i open after effects it says that i didnt install quicktime but i already installed it what to do please help ??????!!!!!!!!!!!!!!!!

    when i open after effects it says that i didnt install quicktime but i already installed it what to do please help ??????!!!!!!!!!!!!!!!!

    Like Mylenium says, check firewall, anti-virus, and other security software.
    If that's not it, read this: http://forums.adobe.com/thread/961743

  • Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    You might find useful information in item D1 of Time Machine Troubleshooting.

  • I have just getting a new phone and I have forgot my password an Apple ID what I made new for the new phone now I cannot get on it because asking for id and password what should I do help plz thank u

    I have just getting a new phone and I have forgot my password an Apple ID what I made new for the new phone now I cannot get on it because asking for id and password what should I do help plz thank u

    Try
    https://iforgot.apple.com

  • I've just updated my Itunes to the newest update (iso7 I think) and now my itunes won't even open. It just jumps 2-3 times on my dock then doesn't open. I have no idea what to do , please help!

    I've just updated my Itunes to the newest update (iso7 I think) and now my itunes won't even open. It just jumps 2-3 times on my dock then doesn't open. I have no idea what to do , please help!

    Open Finder. Go to the "Go" menu in the menu bar. Press and hold Control and click on Library. Go to "Preferences". Find a file named, "com.apple.iTunes.plist" and delete that file. This won't delete your iTunes content. It will reset iTunes. Try it again.

Maybe you are looking for

  • My wifi is no longer working in my home office

    I have had my desktop in my office for over a year, last week it stopped working. All other devices are working fine. I can move my desktop to other rooms in the house and wi-fi works fine, but when i plug it back in the office it no longer works. I

  • How to save table to file in Mobile 7.1

    Hello, We are using Mobile 7.1. We are trying to save the table context in the mobile client to the local file. We use a FileDownload element in the screen. The FileDownload is bound to a Resource attribute which contains the table data (as well as n

  • How can I delete a Log File in EM

    I created a log file in the Log Configuration from "SOA Infrastructure -> logs -> Log Configuration", but later I found I cannot remove the new created log file. There only are Create, Create Like, Edit Configuration, View Configuration options in EM

  • How do I burn files to a DVD as image files

    I've downloaded some files that I need to update the firmware on my DVD player. The specific instructions say "Copy file named X.iso to a folder on your computer. Open your creation writing software, and set it to burn an image file. Make sure the IS

  • Z97 MPOWER MAX AC not listing M.2 SSD

    Hi. I've just mounted a new PC with the MoBo I wrote in the subject, Z97 Mpower Max AC. I've installed an M.2 SSD, a Samsung XP941 256Gb. The problem is, I can boot from this drive (wich has Windows 7 installed), but I am not getting full speed and I