[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Bug#29900: Fwd: Bug#29900: Oblique Fonts don't work
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2001-07-29 2:20:59
[Download RAW message or body]

David Faure wrote:
> 
> Definitely a Qt issue.
> 
I wouldn't be too sure of that.  The relevant quote of: qtfont_x11 are
attached.

As you can see, it recognizes both 'o' and 'i' for slant to set italic.

Also note in the structure that Width is listed.  Skimming through the
code (I know C but not C++) it appears that the width is used as part of
the font scoring for a match.

Therefore, I guess that KOffice needs to recognize the different width
as a separate font and include it when requesting a match.  But, the
current Qt does not have any means to set width.  So, until "setWidth"
(which will need to be enumerated not boolean) is added you can't use
Helvetica Narrow or other width attributes.

However, it does require 'normal' for an exact match and 'normal' for
width does appear to go into the score.  So, it should just ignore
Helvetica Narrow, and it doesn't.

JRT
["qtfont_x11.txt" (text/plain)]

qfont_x11.cpp:

enum FontFieldNames {                           // X LFD fields
    Foundry,
    Family,
    Weight_,
    Slant,
    Width,
    AddStyle,
    PixelSize,
    PointSize,
    ResolutionX,
    ResolutionY,
    Spacing,
    AverageWidth,
    CharsetRegistry,
    CharsetEncoding };

****************************************************************

    char slant  = tolower( tokens[Slant][0] );
    fd->italic = (slant == 'o' || slant == 'i');

****************************************************************

    if ( qstricmp( tokens[Width], "normal" ) == 0 )
        score |= WidthScore;
    else
        exactMatch = FALSE;





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic