×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    17

    How to change default font size display using python

    Which of the code shown below able to enlarge the size of the default font?How do I use it?

    #t=appuifw.Text()
    #fontname=appuifw.app.t.font[0]
    #fontflags=appuifw.app.t.font[2]
    #fontsize=24
    #appuifw.app.t.font=(fontname,fontsize,fontflags)

    #font='normal'

    #font='title'

    #font='annotation' or 'legend' or 'symbol'

    #font='dense'

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to change default font size display using python

    Here is an excerpt from the PyS60 documentation:

    font

    The font of the text. There are two possible ways to set this attribute:

    *Using a supported Unicode font, for example u"Latin12". Trying to set a font which is not
    supported by the device has no effect. A list of supported fonts can be retrieved by using
    appuifw.available_fonts.

    Example, setting font:
    t = appuifw.Text()
    t.font = u"albi17b" # sets font to Albi 17 bold
    t.font = u"LatinPlain12" # sets font to Latin Plain 12

    *Using one of the default device fonts that are associated with the following labels (plain
    strings): 'annotation', 'title', 'legend', 'symbol', 'dense', 'normal'

    Example,setting font:
    t.font = "title" # sets font to the one used in titles
    Example, checking the currently set font:
    unicodeFont = t.font
    The attribute value retrieved is always a Unicode string. If the font has been set with a label, for
    example, 'title', the attribute will retrieve the font associated with that label.

Similar Threads

  1. How to change Font size in rich text editor
    By rhvaibhav in forum Symbian
    Replies: 2
    Last Post: 2007-10-01, 12:34
  2. Using new gdr font in python?? :(
    By kavanshah in forum Symbian
    Replies: 2
    Last Post: 2006-06-09, 13:56
  3. [announce] full screen dot amtrix scroller
    By xchip in forum Symbian
    Replies: 7
    Last Post: 2006-06-08, 22:17
  4. Replies: 3
    Last Post: 2005-01-13, 02:53
  5. Replies: 1
    Last Post: 2004-03-11, 07:33

Posting Permissions

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