Patch (was: function 'x-make-font-bold-italic-xft' doesn't work right)

Mike FABIAN mfabian at suse.de
Wed Jul 18 14:09:51 EDT 2007


Mike FABIAN <mfabian at suse.de> さんは書きました:

>     (x-make-font-italic-xft "DejaVu Sans:size=14")
>     "DejaVu Sans-14:slant=110"
>
> OK.
>
>     (x-make-font-bold-xft "DejaVu Sans:size=14")
>     "DejaVu Sans-14:weight=200"
>
> OK.
>
>     (x-make-font-bold-italic-xft "DejaVu Sans:size=14")
>     "DejaVu Sans-14:weight=200"
>
> Wrong, this should be "DejaVu Sans-14:weight=200:slant=110".

Attached is a patch which appears to fix the problem for me.

See also

    http://bugzilla.novell.com/show_bug.cgi?id=292811

I think 'x-make-font-bold-xft' should keep the value of "slant" if
there is one in the pattern in order not to destroy the italicness.

In the same way, 'x-make-font-italic-xft' should keep the value of
"weight" in the pattern.

With my patch:

    (x-make-font-italic-xft "DejaVu Sans:size=14")
    "DejaVu Sans-14:slant=110:weight=80"

    (x-make-font-bold-xft "DejaVu Sans:size=14")
    "DejaVu Sans-14:slant=0:weight=200"

    (x-make-font-bold-italic-xft "DejaVu Sans:size=14")
    "DejaVu Sans-14:slant=110:weight=200"

    (x-make-font-italic-xft "DejaVu Sans:size=14:style=Bold")
    "DejaVu Sans-14:slant=110:weight=200"

    (x-make-font-bold-xft "DejaVu Sans:size=14:style=Oblique")
    "DejaVu Sans-14:slant=110:weight=200"

That seems to be a more reasonable behaviour.

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
I � Unicode

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugzilla-292811-make-x-make-font-bold-italic-xft-work.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-beta/attachments/20070718/87ca8de9/bugzilla-292811-make-x-make-font-bold-italic-xft-work.bin


More information about the XEmacs-Beta mailing list