×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    23

    Any body know how to add font to s80 Emulator?

    I try to add font by copy font to folder:
    C:\Symbian\7.0s\S80_DP2_0_SDK\epoc32\release\wins\udeb\z\system\Fonts

    But it dose not work (word not display this font on choose font dialog)!

    Please help me!
    Last edited by ice_wizard; 2005-03-10 at 08:23.

  2. #2
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hi,

    There is no sense to add anything to Z drive becase is real device you cannot do that trick.

    Br V

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    23
    You are wrong. On real device, I use this way to add new font, include unicode. Just restart the communicator and it understand new font. But I can't do this in debug tool!
    Please tell me how to install new font to emulator, if there is any other way!

  4. #4
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    How did you add files to the Z drive of target device ?

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    23
    You realy don't know how?
    Just open File Manager.
    in the menu : Tools -> Settings... -> change "Show system directory" to Yes. Now you can access Z driver!

  6. #6
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    :-) :-o

    Yes you can read those files but not able to modify or add -> no sense to add anything to the emulator z-drive. But you cannot even read those with the official file manager.

    System files are shown only from the C-drive not from Z-drive which is ROM memory. If you want to add to correspond drive in the emulator environment you should add to the following path:
    epoc32\wins\c\system\Fonts

    "System files" are not the files of Z-drive, instead those are system files of C-drive which are hidden by default.

    Br V


    Last edited by veskola; 2005-03-15 at 11:11.

  7. #7
    Registered User
    Join Date
    Mar 2005
    Posts
    23
    I don't know why but when I copy fonts to System files on drive C as you said. It work properly!
    I have tried to copy fonts to all folder fonts in epoc32 but it didn't work at all! Have you ever install successful a font to emulator? If yes, please tell me how did you install SDK and the way you install that font! May be I have missed something when install!
    Thank for your reply!

  8. #8
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hello again...

    I have now played with this problem for a while and find something.My environment is Series80_SDK_1_0_1b.

    I wrote this simple code:
    Code:
    void CExampleAppView::SetFontL()
    {
        CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();
        TInt iNumTypefaces = screenDevice->NumTypefaces();
        TTypefaceSupport myTypefaceSupport;
        for (TInt ii=0; ii<iNumTypefaces; ii++)
        {
            iCoeEnv->ScreenDevice()->TypefaceSupport(myTypefaceSupport,ii);
            myTypefaceSupport.iTypeface.iName.Des();
        }
    
        if (iEditorFont)
        {
            iCoeEnv->ReleaseScreenFont(iEditorFont);
        }
    
        // Create font
        TInt FontSize=450;
        _LIT(FontName,"BungaloSCapsSSK");
    
        TFontSpec* fontSpec = new TFontSpec(FontName,FontSize);
        CleanupStack::PushL(fontSpec);
        screenDevice->GetNearestFontInTwips(iEditorFont,*fontSpec);
        CleanupStack::PopAndDestroy(fontSpec);
    }
    
    _LIT(KHelloText,"Hello Symbian world");
    void CExampleAppView::Draw(const TRect& /*aRect*/) const
    {
       // Window graphics context
        CWindowGc& gc = SystemGc();
        TRect drawRect = Rect();
        gc.Clear();
        if (iEditorFont)
        {
            gc.UseFont(iEditorFont);
            TInt baseline = drawRect.Height()/2 + iEditorFont->AscentInPixels()/2;
            gc.DrawText(KHelloText,drawRect,baseline,CGraphicsContext::ECenter, 0);
        }
    }
    }
    I seek a font from the internet and found couple files (bungalo.gdr and Bungalo.ttf ). I noticed if i put .gdr to the c-drive of emulator (\Epoc32\wins\c\system\Fonts) it won't be detected by the system BUT if i put .ttf there it will work fine.

    http://www.nic.fi/~danes/epoc/hello_sw.jpg

    [font files can be fount there too]

    Conclusion: GDR files won't work with emulator but work fine with device???. TTF fonts works fine with emulator

    Br V
    Last edited by veskola; 2005-03-18 at 18:07.

Posting Permissions

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