The prohibited letter? Why we cannot use the letter 'f' with BBAlpha without?

This is a fun one. drawText() can paint the letter 'f' when you use BBAlpha font.

I expanded a field class to create a simple banner with the following code. This will display "abcde gh" when you use 'Without BBAlpha' or "BBAlpha Serif" as default system font.   No "BBAlpa" fonts do not have this problem, they don't make the lowercase "f".

    protected void paint(Graphics graphics) {
        // First draw the background colour
        graphics.setColor(0xFF000000);
        graphics.fillRect(0, 0, getWidth(), getHeight());

        // Then draw the text
        Font _font = getFont().derive(Font.PLAIN, 20, Ui.UNITS_pt).derive(Font.BOLD);
        graphics.setFont(_font);

        String text = "abcdefgh";

        int textWidth = _font.getAdvance(text);
        int x = (getWidth()-textWidth)/2;
        int letterWidth = 0;
        for (int i=0;i

Any advice on how to proceed? I guess I picked a font, but I would rather to honor the preferences of the user. Someone knows how this view of the letter 'f '?

I found a work around:

graphics.drawText(Text,
        x,                  //x
        getHeight()/2,              //y
        DrawStyle.VCENTER,          //style
        letterWidth+5);             //width

Looks like the letter 'f' is probably greater than the reported advance and therefore exceeds the projected width. My guess is he gets clipped. A factor adding little fudge does appear...

Tags: BlackBerry Developers

Similar Questions

  • Why did Windows using stealth tactics and install updates without permission or notice?

    Why did Windows using stealth tactics and install updates without permission or notice?
    It becomes a regular event, it also seems to restart in the middle of the night to set up these updates. I don't know what the intention but
    [Vista 32 bit] I returned this intrusion in the files to my PC and I always despise microsoft to decide to act like a pirate.  I'll give microsoft some time to answer this, but I expect to be as horrible as they are usually with the customer service.   So in a few weeks, I'll start to smear the name of microsoft as much as possible and sway anyone my possible to buy non-Microsoft products.

    Read here:

    Microsoft Update product team blog: Windows Update and automatic reboots

    http://blogs.technet.com/Mu/archive/2008/10/02/Windows-Update-and-automatic-reboots.aspx>

    Change how Windows installs or notifies you of updates

    http://Windows.Microsoft.com/en-us/Windows7/change-how-Windows-installs-or-notifies-you-about-updates>

    If you select the download updates but let me choose... option, no update will install without your approval. Suppose an update will require a reboot and does not approve the installation of an update until & unless you are ready to restart.

    You can change the AU for the "updates but let me choose whether to download and install them" setting. Once you have done this, you will need to approve the updates are downloaded, the updates are installed and where they are installed.

    I prefer "check for updates but let me choose whether to download and install them" setting.

    UTC/GMT is 13:33 Tuesday, January 31, 2012

  • Cannot use e-gift card with a quote

    Hey guys!

    I have some major problems with a purchase. Thursday (four days ago), I got a quote for a chat for 13 Chromebook sales representative. I couldn't buy then because I had to wait until my gift cards has consolidated. (None of them are promo gift cards.) Today, I checked and gift cards have been consolidated (yay!), so I looked to the top of the quote to complete the purchase. He had nowhere to enter the gift card and apply it towards balance. The only mention of gift cards, I could find was in relationship with (and with) a financing statement. I didn't sign up for an account, but the word "gift" is not even on other pages until the final payment button.

    I spoke with someone in the chat, and he said to select "Gift card" payment type drop down. There is no such don't fall down I can find. The payment page has text links for the different forms of payment that each have their own page. I tried selecting the option 'Pay with two credit cards', but the card does not appear as an option of credit card here.

    then... How can I request a gift card to my balance? I am unable to use a gift card with a quote? Or do I wonder funding to use a gift card?

    Thanks for any help you can provide!

    Thanks for the reply, Lorna. In fact, I was able to get back in touch with the sales team and make the purchase by phone with no problems. Don't know what was going on with the purchase online, but the problem was solved in another way.

  • Is it better to use Windows Server 2008 with or without Hyper-V?

    There are two "families" of Windows Server 2008: with and without Hyper-V.

    I need to install a new Windows Server 2008 (x 64) in a new server machine.  So I was wondering that I should choose.  With or without Hyper-V?  Because in the future, I might want to install VMWare Server 2.  If there is Hyper-V, would there be a conflict?

    Use that WITH Hyper-V. Hyper-V is a role that you add after the installation. If you install one without, so you'll never have the ability to use Hyper-V on this machine, if you need. Please keep in mind that you cannot run virtual Hyper-V and VMware Server computers on the same host at the same time, as the previous poster said - you will see a pretty blue screen if you try

    Dimitri Rodis

    Integrita Systems LLC

    http://www.integritasystems.com

  • Cannot use my shure pg58 with hearing cs6?

    I started the test today and I plugged in my microphone and tried to save, it indicates the frequency of sampling of the output devices and audio do not match. Audio cannot be recorded until this problem is corrected. Use the appropriate operating system or control panel of audio device to adjust the frequency of sampling of the input devices and outpute to use the same settings. Ive tried to change the sampling frequency that it does not help.

    Looks like you are using Windows 7 (or Windows Vista) and Ms. Audition default driver type.  Hearing will not be able to save when Windows is configured with different sampling frequencies for playback and recording.  It is not too difficult difficulty however.

    1. oh no!  Cannot save an audition due to sampling rates do not match!

    2 okay, let's do what she suggested and ensure that our registration (entry) and correspond to frequencies of sampling (output) reading.  First, right click on the speaker icon near the Windows clock in your system tray and choose "recorders".

    3. Select the input channel that you want to use for recording.  Right-click on it and select "Properties".  (You can also just click normally to select and click on the big button Properties, but who did not have a convincing screenshot).

    4. click on the tab advanced, then select your desired sampling frequency from the list.  44 100 Hz or 48 000 Hz are the most common formats.  If you are unsure you need, I'd recommend selecting 44 100.  In both cases, click OK several times to close out of here and do not forget that you selected because...

    5. you will now repeat steps 2 through 4, but this time select playback devices in the menu speaker icon.  Right click on the preferred output channel and choose Properties, then Advanced and set the sampling frequency to match your recording device.

    6. Finally, click OK to save the settings and close the menus.  At the hearing, select Edit > preferences > Audio hardware and set the sampling rate here option to match.

    You should now be able to save!

  • Cannot use my Satellite L350 with ODD caddy

    Hello!

    I have 6 years of cca laptop Toshiba Satellite L350.

    Now, I decided to get SSD for the OS HARD drive instead. So I bought MX100 Crucial SSD 128 GB and place it where was the HARD drive. For the HARD disk, I bought DVD SilverStone Treasure TS09 caddy.

    On SSD, I install Windows 8.1 Pro MSDNAA (without HARD drive in the laptop). After that, I put HDD in DVD caddy and start portable computer. For now, Windows is not working properly, when it comes to the desktop it freezes, only thing I can open the Task Manager.

    Why now computer laptop is not working properly?
    Problem in DVD caddy... is not suitable for my laptop?
    What can I do?
    Do I have to change the properties of the Bios?
    ...?

    Thank you and sorry for my English...

    In the past, many people have reported on this. Problem is that Toshiba does not support these additional adapters and all people use some third party carts. In your case, I think that there are some compatibility issues.

    If you have time to use the option of advanced search on this forum and try to find similar topics.
    I use additional HARD drive, but as the external one.

    It is unclear to me that some BIOS settings can be changed in this regard.

  • Cannot use AVG safe search with version 6 and needs which fixed until I use version 6

    I have a paid AVG application that uses AVG safe search. I need this so I can't use firefox 6 because it which turns off. In addition, my pc seems slow when I tried to use version 6. I don't have a real problem with version 5! I'm forced to use the five version up to what firefox 6 can allow me to use my AVG! I don't want to force firefox to activate AVG either, because that could cause real problems. This info should be resolved by the developers!

    http://forums.Avg.com/us-en/AVG-Free-Forum?sec=thread & Act = Show & ID = 171434

    Safe Search extension is not compatible with Firefox 6.0
    

    Mozilla has released their new browser Firefox 6.0 for the public. Unfortunately, the AVG Safe Search extension is not compatible with this version of browser yet (example screenshot). We found a few glitches in our internal tests and the developers are working on their rectification. A new update of the AVG program will be released soon support fully implemented. You may also notice that some other Firefox extensions are not compatible, as the cycle of development of Firefox is very rapid.

    Please rest assured you are still protected by AVG even if you have already upgraded to Firefox 6.0. The AVG Active Surf Shield component is still checking all data and will prevent you from accessing malicious content even though search results verdict icons are not available temporarily.
    
  • Cannot use my Satellite A200 with TV

    Hello

    Sorry to bother you with this - I recently bought a Satellite A200-A1L and have tried to connect it to my TV via s-video cables... I am not new on this and know how to implement, but there seems to be problems on this laptop.

    I turned on the TV and set up everything to go, but my TV will not pick up the signal or the signal is not updated by the graphics card? My previous laptop worked fine with s-video and the same TV I have yet (a 24 "Sony Trinitron). I bought this laptop to do the same thing, but apparently it won't work no - is that you can do to help me please?

    Despite trying all the functions and the depth reading everything to do with video outputs AND all that says its fine just running will not work HELP ME!

    PS: I am happy with the laptop in general it's a nice piece of kit, I'm just unhappy that the s-video will not work correctly.

    Sincerely, Lisa.

    Hello Lisa

    I have too many Satellite A200 and I tested it with my LCD TV. Everything works fine, and all you have to do is to use the FN + F5 key combination and get on TV. Make sure that the TV is set to the right channel.

    All that s!

  • Cannot use MemoryStick pro duo with Satellite M35x

    Hello

    I can't insert a "memory stick pro duo" card of a digital camera in my Toshiba Satellite m35x.

    Single stick memory slips inside the slot "bridge media" and does not lock at all (I used actually curved tweezers to extract it back).

    It seems that the 'bridge of the media' slot is too large for the memory card.

    I read the user guide and the procedure seems simple.

    What evil?

    I think the question is:

    Is the Satellite M35X supports the memory stick pro duo?

    I put t think so buddy.

    Check your user manual that must be preinstalled on your laptop to make sure which cards are compatible with one whose cards are not supported!

    If the memory stick duo pro is not supported by the internal card slot then you should choose an external external solution as a USB card reader.

    Good bye

  • Cannot use Bluetooth USB Dongle with Satellite P100

    A few months ago, I bought a dongle Bluetooth USB of Marks & Spencers. He says it's a Bluetooth 2 product. When I put the dongle into the USB port I can see no problem with drivers & Bluetooth in my device manager but I am still not able to see Bluetooth anywhere else on the computer and my phone is unable to find t.

    I was not able to load the software which accompanies it as sound does not seem compatible with windows vista. My laptop is Satellite P100 - 160.

    Can someone please tell me what I am doing wrong & what do?

    Thank you.

    You must have at least version 5 of the Bluetooth stack in oder to use it with Vista. Please check your site to sellers of laptop computer for her.

  • Why should I use an LR4 not with my new camera raw format?

    My new camera raw format is unrecognizable with LR4. Anyway around this?

    Yes, use the Adobe's DNG Converter to convert the owners of the raw files to DNG raw files. Then the LR4 will be able to read.

    The Adobe converter is free.

  • Cannot use my GPIB device with labview

    Hi all

    I installed my GPIB card, but now I am facing another issue. When I try to import device recognized by Visia (photo 1) it does not appear.

    My device is a function tektroniks generator. I just need 2 functions: change of frequency, type of wave and amplitude. Any help will be appreciated.

    Concerning

    Tektronix adapter?  I think you should go to your NI-VISA software section MAX.  Then under Options of VISA, there is a section for passports.  I'm fairly certain you need to activate the Tulip passport.

  • The new application with or without folio?

    Hey all

    I'm about to present our new free app in the Apple Store (multi free folio).

    I heard that we will present 'better' the application with a folio inside.

    1. is it compulsory?

    2 or recommend a fast approval?

    3. can we submit with a folio of project (private or public) and update later?

    Thank you

    Content you provide for the approval of the app should be as much as possible close to the production version. Once we have sent 'project' folio ws rejected because of is 'happy unesuful' for iPad users. We got the approval of the spectator when we presented almost ready to go the first issue of the magazine of the customer.

  • ThinkPad X61t: can I use a pen device with WinXP without Tablet Version?

    Ladies and gentlemen,

    Please tell me the truth: I can use not compresses-version of Windows XP with a pen-Interface?

    Can I organize Pen Interface with any kind of drivers, or I need to install the Tablet PC of Windows version?

    And maybe ordinary Windows XP can become a Tablet XP version after installation of drivers of special magic?

    You know any type of software to activate the pen device and touchscreen under non-tablette WINDOWS XP.

    Or it is impossible?

    Thank you for the answers.

    Well, you can get the driver here http://www.wacom.com/productsupport/select.cfm it's only 'pen' good pilot.

    If you need to contact, you can always install driver multitouch above after that.

    Have fun with your tablet,

    sipp11

  • Why my PC cannot use all of the available memory?

    Hello

    I have windows ultimate 64 bit and the 6 GB of ram (laptop)

    http://img03.arabsh.com/uploads/image/2012/09/19/0d36454a60fa0d.PNG

    As shown in the photo, there is a free memory and available memory

    Total: 6058
    caching: 2713
    available: 2552
    free: 1

    Why windows cannot use the available memory, although there is no such thing as free storage space!

    What you see is normal.

    Windows 7 do not free memory. He's trying to preload it with applications that she believes, based on experience, that you may need.

    If you have plenty of RAM, you can see more free memory if Windows doesn't find anything to him with preload.

    Available memory is not actively used by all processes memory but it is preloaded with applications, is of the opinion, based on experience, that you might need as I said above. If it is required by another process, it is available to be used and the preloaded data are deleted.

    I hope this helps you.

Maybe you are looking for