Results 1 to 4 of 4

Thread: What is the line spacing

  1. #1
    Join Date
    Feb 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question What is the line spacing

    Hi All,

    I want to know what the line spacing is, and how is it calculated? I investigate Qt4 source codes, but I have no idea yet.

    Example text:
    Touch go to start
    Press button to continue


    The line spacing is:
    From the bottom of the g in the first line to the top of the P in the second line, OR
    From the bottom of the T of the first line to the top of the P of the second line?

    And how does QT4 calcuate this value?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: What is the line spacing

    Quote Originally Posted by smoozer View Post
    Hi All,

    I want to know what the line spacing is
    Search for leading. Then you will quickly figure out what line spacing means in typographie.

    , and how is it calculated? I investigate Qt4 source codes, but I have no idea yet.

    Example text:
    Touch go to start
    Press button to continue


    The line spacing is:
    From the bottom of the g in the first line to the top of the P in the second line, OR
    From the bottom of the T of the first line to the top of the P of the second line?

    And how does QT4 calcuate this value?

    Thanks!
    I haven't looked up the sources, but Qt should use QFontInfo for getting the height of a font and then calculating the spacing. Depending on the factor you have set.

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What is the line spacing

    Quote Originally Posted by Lykurg View Post
    Search for leading. Then you will quickly figure out what line spacing means in typographie.



    I haven't looked up the sources, but Qt should use QFontInfo for getting the height of a font and then calculating the spacing. Depending on the factor you have set.
    Thank you. I found this figure, and know exactly what the property of one font.


    There is one question about leading:
    QFixed QFontEngineWin::leading() const
    {
    return tm.w.tmExternalLeading;
    }

    The tm.w.tmExternalLeading is always 0 when I debug. Is that the leading in the figure above. And there is one member tm.w.tmInternalLeading, I think, it's the exact leading value. But no witness in source codes. Any idea? Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What is the line spacing

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Why is my application's CPU usage always > 50%
    By richardander in forum Qt Programming
    Replies: 10
    Last Post: 14th October 2010, 23:22
  2. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 14:51
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 10:16
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 19:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.