×

Discussion Board

Results 1 to 10 of 10

Thread: windows font

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    windows font

    Can I import to symbian a text font of windows, for a my application?
    it is legal or is there a copyright?

    Thanks
    Regards A993
    Last edited by andrea993; 2012-04-21 at 12:54.

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    90

    Re: windows font

    All fonts that come with Windows are copyrighted, so distributing them with your application would be illegal.

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: windows font

    Quote Originally Posted by mvuori View Post
    All fonts that come with Windows are copyrighted, so distributing them with your application would be illegal.
    and a free font downloaded from the web?
    Last edited by andrea993; 2012-04-21 at 13:29.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,556

    Re: windows font

    Quote Originally Posted by andrea993 View Post
    and a free font downloaded from the web?
    Depends on what the copyright holder of that font says. When you download a free font from the web, make sure it is really free (who owns the rights to the font, and has the rights to declare it as free, and not just a font someone has taken from somewhere and is redistributing without really knowing or caring of ownership).

  5. #5
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: windows font

    How can I use a font from Windows in the app for Symbian phone?
    I have created a new project and my target is Symbian. When I choose MainPage.wml and I switch to Designer I can change Font of the Hello world Text element. When I run the app in simulator or on the phone the font is resetted to the default one.
    How can I force the phone to use my font?

  6. #6
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: windows font

    You should load the font file (ttf) with QFontDatabase::addApplicationFont() then you can use it.

  7. #7
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: windows font

    Hi Andrea,
    Thanks for your reply. I have been playing with this today but unfortunately I didn't manage to make it work. I get the error
    "FT_New_Face failed with index 0 : 1 "

    Here is what I did:
    1.Inside my project I have created "fonts" directory and I have copied my font to it. In my case it was "BRUSHSCI.TTF"
    2. I have edited main.cpp file. I have added
    QFontDatabase fontDatabase;
    fontDatabase.addApplicationFont("/fonts/BRUSHSCI");
    3. In the MainPage.qml I have added font.family: "Brush Script MT" property to the Text element

    Did I miss something?

  8. #8
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: windows font

    Did I miss something?
    Last edited by Tslv; 2012-05-10 at 23:52. Reason: I did a double post and I didn't found button to delete whole post :( Moderator please delete this post

  9. #9
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: windows font

    If you insert a folder in a project it isn't copied in the phone.
    You can insert the font file in a resource.

    You can also use addApplicationFont() as a static method.

  10. #10
    Registered User
    Join Date
    Apr 2005
    Posts
    55

    Re: windows font

    Hi Andrea,
    I have created a resource file and I have inserted the file "BRUSHSCI.TTF".
    I have changed line in mail.cpp
    fontDatabase.addApplicationFont(":/fonts/BRUSHSCI.TTF");

    Do you know how can I access the font from within QML file? I want to change the font of the text element.
    In the MainPage.qml I have added font.family: "Brush Script MT" property to the Text element. Unfortunately when I run the code in simulator I still get the default font
    Thanks

Similar Threads

  1. Replies: 1
    Last Post: 2010-12-01, 04:45
  2. List not changing Font Size nor Font Types
    By smabres in forum Mobile Java General
    Replies: 2
    Last Post: 2008-09-17, 16:22
  3. Replies: 3
    Last Post: 2005-01-13, 02:53

Posting Permissions

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