×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    30

    CFbsFont::TextWidthInPixels() doesn't work on Emulator with SDK 3.0

    I'm using CW Pro 3.1 along with SDK 3.0.
    I found neither CFbsFont::TextWidthInPixels() or CFbsFont::HeightInPixels() can
    work normally on emulator(not even to port to device). If you call CFbsFont::TextWidthInPixels(), It would even carsh.
    here are part of my code
    ........
    cWindowDC win(TSize(100,100),EColor64K);
    CFbsFont *font;
    Err error;

    _LIT(fntTemp,"Arial");
    if(!(error=win.fBmpDevice->GetNearestFontInPixels(font,TFontSpec(fntTemp,1))))
    {
    TInt len;
    _LIT(tTemp,"Hello");
    len=font->TextWidthInPixels(tTemp);
    }
    ........................

    The emulator will crash in the line "font->TextWidthInPixels(tTemp)". I'm pretty sure that "font" is assigned successfully. and no matter what kind of font you specify(ex. Arial or Roamn or others). It will still crash.

    The other classes I use here(like cWindowDC) is fully tested and OK. these codes can work perfectly on emulator SDK 2.X. So I doublt that must be something wrong with Emulator 3.0.

    Can any body give me a clue on this or anyone has ever successfully run CFbsFont::TextWidthInPixels() on emulator 3.0.

    Kenny

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    20

    Re: CFbsFont::TextWidthInPixels() doesn't work on Emulator with SDK 3.0

    Please check Scalable UI related documentation and list of changes in 3rd Edition of S60. It may happen you are trying to utilize a method or approach which is deprecated by Scalable UI concept. Remember that S60 3rd Edition supports multiple display sizes and orientation modes, thus trying to affix your application to pixels may cause it to look totally wrong in devices with different display size.

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    30

    Re: CFbsFont::TextWidthInPixels() doesn't work on Emulator with SDK 3.0

    Quote Originally Posted by msmyslov
    Please check Scalable UI related documentation and list of changes in 3rd Edition of S60. It may happen you are trying to utilize a method or approach which is deprecated by Scalable UI concept. Remember that S60 3rd Edition supports multiple display sizes and orientation modes, thus trying to affix your application to pixels may cause it to look totally wrong in devices with different display size.
    I'v got it.
    in SDK 3.0. The second param of TFontSpec(fntTemp,n) should be the height you want, rather then 1.

Similar Threads

  1. 6610 support for PC Connectivity SDK 3.0 Beta
    By nathenliew in forum PC Suite API and PC Connectivity SDK
    Replies: 10
    Last Post: 2008-10-16, 06:29
  2. VB and SDK 3.0
    By pallav_sheth in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2004-05-21, 09:44
  3. VB and SDK 3.0
    By pallav_sheth in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2004-05-19, 14:50
  4. SDK 3.0 installation
    By tmuda0 in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-06-18, 12:29
  5. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×