* bug#2667: Still seeing inconsistent fonts
@ 2009-05-06 4:17 Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2009-05-06 4:17 UTC (permalink / raw)
To: 2667
I also noticed recently that my fonts are inconsistent: when writing
math symbols (mostly greek letters), I notice that they do not use my
misc-fixed font but "DejaVu Sans" instead.
E.g.:
> xrdb -remove; rm ~/.Xdefaults
> emacs -Q ~/re/papers/comp-deptypes/main.tex
M-: (setq font-log nil) RET
M-: (set-face-font 'default "-misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-*")
And now all my latin text uses my beloved misc-fixed:
x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 (#x3A)
but all the math symbols use "DejaVu Sans":
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-13-*-*-*-*-0-iso10646-1 (#xC3E)
The output of font-show-log is appended. The same steps with Emacs-22
correctly use the misc-fixed font, of course.
Stefan
font for: (8322)
ftfont-list: -misc-fixed-*--*-iso8859-1
xfont-list: -misc-fixed-*-*-*--*-*-*-*-*-*-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-normal--9-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-normal--9-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-normal--8-*-75-75-c-50-iso8859-1
-misc-fixed-medium-r-normal--8-*-100-100-c-50-iso8859-1
-misc-fixed-medium-r-normal--7-*-75-75-c-50-iso8859-1
-misc-fixed-medium-r-normal--7-*-100-100-c-50-iso8859-1
-misc-fixed-medium-r-normal--6-*-75-75-c-40-iso8859-1
-misc-fixed-medium-r-normal--20-*-75-75-c-100-iso8859-1
-misc-fixed-medium-r-normal--20-*-100-100-c-100-iso8859-1
-misc-fixed-medium-r-normal--18-*-100-100-c-90-iso8859-1
-misc-fixed-medium-r-normal--15-*-75-75-c-90-iso8859-1
-misc-fixed-medium-r-normal--15-*-100-100-c-90-iso8859-1
-misc-fixed-medium-r-normal--14-*-75-75-c-70-iso8859-1
-misc-fixed-medium-r-normal--14-*-100-100-c-70-iso8859-1
-misc-fixed-medium-r-normal--13-*-75-75-c-80-iso8859-1
...
list: -misc-fixed-medium-r-semicondensed--*-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
sort-by: -*-unspecified-unspecified-unspecified-*-13-*
x:-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
open: -misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
list: -misc-fixed-medium-r-semicondensed--*-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
sort-by: -*-normal-normal-normal-*-13-*
x:-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
ftfont-list: -misc-fixed-*--*-c-*-iso8859-1
xfont-list: -misc-fixed-*-*-*--*-*-*-*-c-*-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-normal--9-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-normal--9-*-100-100-c-60-iso8859-1
-misc-fixed-medium-r-normal--8-*-75-75-c-50-iso8859-1
-misc-fixed-medium-r-normal--8-*-100-100-c-50-iso8859-1
-misc-fixed-medium-r-normal--7-*-75-75-c-50-iso8859-1
-misc-fixed-medium-r-normal--7-*-100-100-c-50-iso8859-1
-misc-fixed-medium-r-normal--6-*-75-75-c-40-iso8859-1
-misc-fixed-medium-r-normal--20-*-75-75-c-100-iso8859-1
-misc-fixed-medium-r-normal--20-*-100-100-c-100-iso8859-1
-misc-fixed-medium-r-normal--18-*-100-100-c-90-iso8859-1
-misc-fixed-medium-r-normal--15-*-75-75-c-90-iso8859-1
-misc-fixed-medium-r-normal--15-*-100-100-c-90-iso8859-1
-misc-fixed-medium-r-normal--14-*-75-75-c-70-iso8859-1
-misc-fixed-medium-r-normal--14-*-100-100-c-70-iso8859-1
-misc-fixed-medium-r-normal--13-*-75-75-c-80-iso8859-1
...
list: -misc-fixed-*-r-semicondensed--*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-bold-r-semicondensed--13-*-75-75-c-60-iso8859-1
sort-by: -*-light-r-semicondensed-*-13-*
x:-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
open: -misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
list: -misc-fixed-*-r-semicondensed--*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-bold-r-semicondensed--13-*-75-75-c-60-iso8859-1
sort-by: -*-light-r-semicondensed-*-13-*
x:-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
font for: (8321)
ftfont-list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*--*-iso10646-1:script=symbol
ftfont-list: -misc-fixed-*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
ftfont-list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
ftfont-list: -*-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
ftfont-list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
ftfont-list: -misc-*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
ftfont-list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
open: -unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1:script=symbol
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-13-*-0-iso10646-1
font for: (8704)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (928)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (964)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (8614)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (8594)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (937)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (8658)
list: -misc-fixed-*--*-iso10646-1:script=symbol
list: -misc-fixed-*-iso10646-1:script=symbol
list: -*-fixed-*--*-iso10646-1:script=symbol
list: -*-fixed-*-iso10646-1:script=symbol
list: -misc-*--*-iso10646-1:script=symbol
list: -misc-*-iso10646-1:script=symbol
list: -*--*-iso10646-1:script=symbol
-microsoft-Georgia-normal-italic-normal-*-0-iso10646-1
-monotype-Arial-bold-normal-normal-*-0-iso10646-1
-urw-Nimbus Mono L-normal-normal-normal-*-m-0-iso10646-1
-unknown-DejaVu Serif-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-normal-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-normal-italic-normal-*-0-iso10646-1
-unknown-Liberation Sans-normal-normal-normal-*-0-iso10646-1
-bitstream-Courier 10 Pitch-normal-italic-normal-*-m-0-iso10646-1
-monotype-Andale Mono-normal-normal-normal-*-m-0-iso10646-1
-urw-URW Bookman L-normal-italic-normal-*-0-iso10646-1
-microsoft-Verdana-bold-italic-normal-*-0-iso10646-1
-unknown-DejaVu Serif-normal-italic-normal-*-0-iso10646-1
-urw-Nimbus Sans L-normal-normal-normal-*-0-iso10646-1
-microsoft-Trebuchet MS-bold-italic-normal-*-0-iso10646-1
-monotype-Arial Black-normal-normal-normal-*-0-iso10646-1
-monotype-Times New Roman-bold-normal-normal-*-0-iso10646-1
-unknown-DejaVu Sans-bold-oblique-semi-condensed-*-0-iso10646-1
-monotype-Times New Roman-bold-italic-normal-*-0-iso10646-1
...
sort-by: -*-medium-r-semicondensed-*-13-*
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-0-iso10646-1
font for: (937)
list: -misc-fixed-*-r-semicondensed--*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-bold-r-semicondensed--13-*-75-75-c-60-iso8859-1
sort-by: -*-bold-r-semicondensed-*-13-*
x:-misc-fixed-bold-r-semicondensed--13-*-75-75-c-60-iso8859-1
open: -misc-fixed-bold-r-semicondensed--13-*-75-75-c-60-iso8859-1
x:-misc-fixed-bold-r-semicondensed--13-120-75-75-c-60-iso8859-1
font for: (937)
list: -misc-fixed-medium-*-semicondensed--*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-*-75-75-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--12-*-75-75-c-60-iso8859-1
-misc-fixed-medium-o-semicondensed--13-*-75-75-c-60-iso8859-1
sort-by: -*-medium-italic-semicondensed-*-13-*
x:-misc-fixed-medium-o-semicondensed--13-*-75-75-c-60-iso8859-1
open: -misc-fixed-medium-o-semicondensed--13-*-75-75-c-60-iso8859-1
x:-misc-fixed-medium-o-semicondensed--13-120-75-75-c-60-iso8859-1
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
@ 2009-05-08 3:41 Chong Yidong
2009-05-08 19:58 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-05-08 3:41 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 2667
> I also noticed recently that my fonts are inconsistent: when writing
> math symbols (mostly greek letters), I notice that they do not use my
> misc-fixed font but "DejaVu Sans" instead.
>
> > xrdb -remove; rm ~/.Xdefaults
> > emacs -Q ~/re/papers/comp-deptypes/main.tex
> M-: (setq font-log nil) RET
> M-: (set-face-font 'default
> > "-misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-*")
>
> And now all my latin text uses my beloved misc-fixed
> but all the math symbols use "DejaVu Sans"
I can't reproduce this. Could you provide a self-contained testcase?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-08 3:41 bug#2667: Still seeing inconsistent fonts Chong Yidong
@ 2009-05-08 19:58 ` Stefan Monnier
2009-05-11 12:21 ` Kenichi Handa
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-05-08 19:58 UTC (permalink / raw)
To: Chong Yidong; +Cc: 2667
> I can't reproduce this. Could you provide a self-contained testcase?
Sure:
> xrdb -remove
> rm ~/.Xdefaults
> src/emacs -Q --eval '(set-face-font (quote default) \
"-misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-*")'
C-u C-\ TeX RET
a
\ ' e
\ ' r
\ f o r a l l
"aéŕ" use misc-fixed-semicondensed (the first two with iso8859-1 and
the last with iso8859-2), but "∀" is displayed with
xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-13-*-*-*-*-0-iso10646-1
Note that Emacs-22.3 used
-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1 for
both "ŕ" and "∀".
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-08 19:58 ` Stefan Monnier
@ 2009-05-11 12:21 ` Kenichi Handa
2009-05-11 15:56 ` Chong Yidong
2009-05-20 19:43 ` Stefan Monnier
0 siblings, 2 replies; 10+ messages in thread
From: Kenichi Handa @ 2009-05-11 12:21 UTC (permalink / raw)
To: Stefan Monnier, 2667; +Cc: cyd, 2667
Sorry for the late response on this matter.
In article <jwv7i0rml4c.fsf-monnier+emacsbugreports@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> > I can't reproduce this. Could you provide a self-contained testcase?
> Sure:
> xrdb -remove
> rm ~/.Xdefaults
> src/emacs -Q --eval '(set-face-font (quote default) \
> "-misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-*")'
> C-u C-\ TeX RET
> a
> \ ' e
> \ ' r
> \ f o r a l l
> "aéŕ" use misc-fixed-semicondensed (the first two with iso8859-1 and
> the last with iso8859-2), but "∀" is displayed with
> xft:-unknown-DejaVu Sans-normal-normal-semi-condensed-*-13-*-*-*-*-0-iso10646-1
∀ belongs to `symbol' script, but the xfont backend didn't
support :script font property. That is because I was afraid
that it made the font listing extremely slow (we must open
all iso10646-1 fonts to check if it supports the requested
characters). Actually my trial implementation of :script
property supports took more than 1 minute to display HELLO
file.
But, if we can use this heuristic:
X fonts that have the same property values except for
size related properties supports the same set of
characters on all display. For example, all these fonts
-adobe-courier-medium-r-normal--8-80-75-75-m-50-iso10646-1
-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso10646-1
-adobe-courier-medium-r-normal--11-80-100-100-m-60-iso10646-1
-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso10646-1
-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
-adobe-courier-medium-r-normal--17-120-100-100-m-100-iso10646-1
-adobe-courier-medium-r-normal--18-180-75-75-m-110-iso10646-1
-adobe-courier-medium-r-normal--20-140-100-100-m-110-iso10646-1
-adobe-courier-medium-r-normal--24-240-75-75-m-150-iso10646-1
-adobe-courier-medium-r-normal--25-180-100-100-m-150-iso10646-1
-adobe-courier-medium-r-normal--34-240-100-100-m-200-iso10646-1
suports the same set of characters.
we can list fonts in a realistic time. Attached is the
patch to try it. Could you please test it? As the change
is not simple, I have not yet installed it.
---
Kenichi Handa
handa@m17n.org
Index: xfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfont.c,v
retrieving revision 1.28
diff -u -r1.28 xfont.c
--- xfont.c 8 May 2009 06:22:40 -0000 1.28
+++ xfont.c 11 May 2009 12:03:16 -0000
@@ -256,20 +256,172 @@
return len;
}
-static Lisp_Object xfont_list_pattern P_ ((Lisp_Object, Display *, char *));
+static int xfont_chars_supported P_ ((Lisp_Object, XFontStruct *,
+ struct charset *, struct charset *));
+
+/* Check if CHARS (cons or vector) is supported by XFONT whose
+ encoding charset is ENCODING (XFONT is NULL) or by a font whose
+ registry corresponds to ENCODING and REPERTORY.
+ Return 1 if supported, return 0 otherwise. */
+
+static int
+xfont_chars_supported (chars, xfont, encoding, repertory)
+ Lisp_Object chars;
+ XFontStruct *xfont;
+ struct charset *encoding, *repertory;
+{
+ struct charset *charset = repertory ? repertory : encoding;
+
+ if (CONSP (chars))
+ {
+ for (; CONSP (chars); chars = XCDR (chars))
+ {
+ int c = XINT (XCAR (chars));
+ unsigned code = ENCODE_CHAR (charset, c);
+ XChar2b char2b;
+
+ if (code == CHARSET_INVALID_CODE (charset))
+ break;
+ if (! xfont)
+ continue;
+ if (code >= 0x10000)
+ break;
+ char2b.byte1 = code >> 8;
+ char2b.byte2 = code & 0xFF;
+ if (! xfont_get_pcm (xfont, &char2b))
+ break;
+ }
+ return (NILP (chars));
+ }
+ else if (VECTORP (chars))
+ {
+ int i;
+
+ for (i = ASIZE (chars) - 1; i >= 0; i--)
+ {
+ int c = XINT (AREF (chars, i));
+ unsigned code = ENCODE_CHAR (charset, c);
+ XChar2b char2b;
+
+ if (code == CHARSET_INVALID_CODE (charset))
+ continue;
+ if (! xfont)
+ break;
+ if (code >= 0x10000)
+ continue;
+ char2b.byte1 = code >> 8;
+ char2b.byte2 = code & 0xFF;
+ if (xfont_get_pcm (xfont, &char2b))
+ break;
+ }
+ return (i >= 0);
+ }
+ return 0;
+}
+
+/* A hash table recoding which font supports which scritps. Each key
+ is a vector of characteristic font propertis FOUNDRY to WIDTH and
+ ADDSTYLE, and each value is a list of script symbols.
+
+ We assume that fonts that have the same value in the above
+ properties supports the same set of characters on all displays. */
+
+static Lisp_Object xfont_scripts_cache;
+
+/* Return a list of scripts supported by the font of FONTNAME whose
+ characteristic properties are in PROPS and whose encoding charset
+ is ENCODING. A caller must call BLOCK_INPUT in advance. */
static Lisp_Object
-xfont_list_pattern (frame, display, pattern)
- Lisp_Object frame;
+xfont_supported_scripts (display, fontname, props, encoding)
+ Display *display;
+ char *fontname;
+ Lisp_Object props;
+ struct charset *encoding;
+{
+ Lisp_Object scripts;
+
+ /* Two special cases to avoid opening rather big fonts. */
+ if (AREF (props, 2), Qja)
+ return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil));
+ if (AREF (props, 2), Qko)
+ return Fcons (intern ("hangul"), Qnil);
+ scripts = Fgethash (props, xfont_scripts_cache, Qt);
+ if (EQ (scripts, Qt))
+ {
+ XFontStruct *xfont;
+ Lisp_Object val;
+
+ scripts = Qnil;
+ xfont = XLoadQueryFont (display, fontname);
+ if (xfont)
+ {
+ if (xfont->per_char)
+ {
+ for (val = Vscript_representative_chars; CONSP (val);
+ val = XCDR (val))
+ if (CONSP (XCAR (val)) && SYMBOLP (XCAR (XCAR (val))))
+ {
+ Lisp_Object script = XCAR (XCAR (val));
+ Lisp_Object chars = XCDR (XCAR (val));
+
+ if (xfont_chars_supported (chars, xfont, encoding, NULL))
+ scripts = Fcons (script, scripts);
+ }
+ }
+ XFreeFont (display, xfont);
+ }
+ Fputhash (Fcopy_sequence (props), scripts, xfont_scripts_cache);
+ }
+ return scripts;
+}
+
+extern Lisp_Object Vscalable_fonts_allowed;
+
+static Lisp_Object xfont_list_pattern P_ ((Display *, char *,
+ Lisp_Object, Lisp_Object));
+
+static Lisp_Object
+xfont_list_pattern (display, pattern, registry, script)
Display *display;
char *pattern;
+ Lisp_Object registry, script;
{
Lisp_Object list = Qnil;
+ Lisp_Object chars = Qnil;
+ struct charset *encoding, *repertory = NULL;
int i, limit, num_fonts;
char **names;
/* Large enough to decode the longest XLFD (255 bytes). */
char buf[512];
+ if (! NILP (registry)
+ && font_registry_charsets (registry, &encoding, &repertory) < 0)
+ /* Unknown REGISTRY, not supported. */
+ return Qnil;
+ if (! NILP (script))
+ {
+ chars = assq_no_quit (script, Vscript_representative_chars);
+ if (NILP (chars))
+ /* We can't tell whether or not a font supports SCRIPT. */
+ return Qnil;
+ chars = XCDR (chars);
+ if (repertory)
+ {
+ if (! xfont_chars_supported (chars, NULL, encoding, repertory))
+ return Qnil;
+ script = Qnil;
+ }
+ }
+ if (! repertory && NILP (xfont_scripts_cache))
+ {
+ Lisp_Object args[2];
+
+ args[0] = QCtest;
+ args[1] = Qequal;
+ xfont_scripts_cache = Fmake_hash_table (2, args);
+ }
+
BLOCK_INPUT;
x_catch_errors (display);
@@ -292,6 +444,8 @@
if (num_fonts > 0)
{
char **indices = alloca (sizeof (char *) * num_fonts);
+ Lisp_Object props = Fmake_vector (make_number (9), Qnil);
+ Lisp_Object scripts = Qnil;
for (i = 0; i < num_fonts; i++)
indices[i] = names[i];
@@ -300,47 +454,68 @@
for (i = 0; i < num_fonts; i++)
{
Lisp_Object entity;
- int result;
- char *p;
if (i > 0 && xstrcasecmp (indices[i - 1], indices[i]) == 0)
continue;
-
entity = font_make_entity ();
- ASET (entity, FONT_TYPE_INDEX, Qx);
xfont_decode_coding_xlfd (indices[i], -1, buf);
- result = font_parse_xlfd (buf, entity);
- if (result < 0)
+ font_parse_xlfd (buf, entity);
+ ASET (entity, FONT_TYPE_INDEX, Qx);
+ /* Avoid auto-scaled fonts. */
+ if (XINT (AREF (entity, FONT_DPI_INDEX)) != 0
+ && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0)
+ continue;
+ /* Avoid not-allowed scalable fonts. */
+ if (NILP (Vscalable_fonts_allowed))
{
- /* This may be an alias name. Try to get the full XLFD name
- from XA_FONT property of the font. */
- XFontStruct *font = XLoadQueryFont (display, indices[i]);
- unsigned long value;
-
- if (! font)
+ if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0)
continue;
- if (XGetFontProperty (font, XA_FONT, &value))
- {
- char *name = (char *) XGetAtomName (display, (Atom) value);
- int len = strlen (name);
+ }
+ else if (CONSP (Vscalable_fonts_allowed))
+ {
+ Lisp_Object tail, elt;
- /* If DXPC (a Differential X Protocol Compressor)
- Ver.3.7 is running, XGetAtomName will return null
- string. We must avoid such a name. */
- if (len > 0)
- {
- xfont_decode_coding_xlfd (indices[i], -1, buf);
- result = font_parse_xlfd (buf, entity);
- }
- XFree (name);
+ for (tail = Vscalable_fonts_allowed; CONSP (tail);
+ tail = XCDR (tail))
+ {
+ elt = XCAR (tail);
+ if (STRINGP (elt)
+ && fast_c_string_match_ignore_case (elt, indices[i]) >= 0)
+ break;
}
- XFreeFont (display, font);
+ if (! CONSP (tail))
+ continue;
}
- if (result == 0
- /* Avoid auto-scaled fonts. */
- && (XINT (AREF (entity, FONT_DPI_INDEX)) == 0
- || XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) > 0))
+ /* Update encoding and repertory if necessary. */
+ if (! EQ (registry, AREF (entity, FONT_REGISTRY_INDEX)))
+ {
+ registry = AREF (entity, FONT_REGISTRY_INDEX);
+ if (font_registry_charsets (registry, &encoding, &repertory) < 0)
+ encoding = NULL;
+ }
+ if (! encoding)
+ /* Unknown REGISTRY, not supported. */
+ continue;
+ if (repertory)
+ {
+ if (NILP (script)
+ || xfont_chars_supported (chars, NULL, encoding, repertory))
+ list = Fcons (entity, list);
+ continue;
+ }
+ if (memcmp (&(AREF (props, 0)), &(AREF (entity, FONT_FOUNDRY_INDEX)),
+ sizeof (Lisp_Object) * 7)
+ || ! EQ (AREF (entity, FONT_SPACING_INDEX), AREF (props, 8)))
+ {
+ memcpy (&(AREF (props, 0)), &(AREF (entity, FONT_FOUNDRY_INDEX)),
+ sizeof (Lisp_Object) * 7);
+ ASET (props, 8, AREF (entity, FONT_SPACING_INDEX));
+ scripts = xfont_supported_scripts (display, indices[i],
+ props, encoding);
+ }
+ if (NILP (script)
+ || ! NILP (Fmemq (script, scripts)))
list = Fcons (entity, list);
}
XFreeFontNames (names);
@@ -359,7 +534,7 @@
{
FRAME_PTR f = XFRAME (frame);
Display *display = FRAME_X_DISPLAY_INFO (f)->display;
- Lisp_Object registry, list, val, extra;
+ Lisp_Object registry, list, val, extra, script;
int len;
/* Large enough to contain the longest XLFD (255 bytes) in UTF-8. */
char name[512];
@@ -370,9 +545,6 @@
val = assq_no_quit (QCotf, extra);
if (! NILP (val))
return Qnil;
- val = assq_no_quit (QCscript, extra);
- if (! NILP (val))
- return Qnil;
val = assq_no_quit (QClang, extra);
if (! NILP (val))
return Qnil;
@@ -382,8 +554,13 @@
len = font_unparse_xlfd (spec, 0, name, 512);
if (len < 0 || (len = xfont_encode_coding_xlfd (name)) < 0)
return Qnil;
- ASET (spec, FONT_REGISTRY_INDEX, registry);
- list = xfont_list_pattern (frame, display, name);
+
+ val = assq_no_quit (QCscript, extra);
+ if (NILP (val))
+ script = Qnil;
+ else
+ script = XCDR (val);
+ list = xfont_list_pattern (display, name, registry, script);
if (NILP (list) && NILP (registry))
{
/* Try iso10646-1 */
@@ -392,7 +569,7 @@
if (r - name + 10 < 256) /* 10 == strlen (iso10646-1) */
{
strcpy (r, "iso10646-1");
- list = xfont_list_pattern (frame, display, name);
+ list = xfont_list_pattern (display, name, Qiso10646_1, script);
}
}
if (NILP (list) && ! NILP (registry))
@@ -412,7 +589,7 @@
&& ((r - name) + SBYTES (XCAR (alter))) < 256)
{
strcpy (r, (char *) SDATA (XCAR (alter)));
- list = xfont_list_pattern (frame, display, name);
+ list = xfont_list_pattern (display, name, registry, script);
if (! NILP (list))
break;
}
@@ -427,7 +604,7 @@
bcopy (SDATA (XCDR (val)), name, SBYTES (XCDR (val)) + 1);
if (xfont_encode_coding_xlfd (name) < 0)
return Qnil;
- list = xfont_list_pattern (frame, display, name);
+ list = xfont_list_pattern (display, name, registry, script);
}
}
@@ -996,6 +1173,8 @@
void
syms_of_xfont ()
{
+ staticpro (&xfont_scripts_cache);
+ xfont_scripts_cache = Qnil;
xfont_driver.type = Qx;
register_font_driver (&xfont_driver, NULL);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-11 12:21 ` Kenichi Handa
@ 2009-05-11 15:56 ` Chong Yidong
2009-05-11 17:23 ` Stefan Monnier
2009-05-20 19:43 ` Stefan Monnier
1 sibling, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-05-11 15:56 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 2667
Kenichi Handa <handa@m17n.org> writes:
> But, if we can use this heuristic:
>
> X fonts that have the same property values except for
> size related properties supports the same set of
> characters on all display.
>
> we can list fonts in a realistic time. Attached is the
> patch to try it. Could you please test it? As the change
> is not simple, I have not yet installed it.
I don't have a good sense of whether this problem is serious enough to
justify the change, at this stage in the pretest. Stefan, what's your
feeling about this?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-11 15:56 ` Chong Yidong
@ 2009-05-11 17:23 ` Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2009-05-11 17:23 UTC (permalink / raw)
To: Chong Yidong; +Cc: 2667
>> But, if we can use this heuristic:
>> X fonts that have the same property values except for
>> size related properties supports the same set of
>> characters on all display.
>> we can list fonts in a realistic time. Attached is the
>> patch to try it. Could you please test it? As the change
>> is not simple, I have not yet installed it.
> I don't have a good sense of whether this problem is serious enough to
> justify the change, at this stage in the pretest. Stefan, what's your
> feeling about this?
Not sure either. I'll come back when I've tried it out some more.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-11 12:21 ` Kenichi Handa
2009-05-11 15:56 ` Chong Yidong
@ 2009-05-20 19:43 ` Stefan Monnier
2009-05-21 1:15 ` Kenichi Handa
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-05-20 19:43 UTC (permalink / raw)
To: Kenichi Handa; +Cc: cyd, 2667
> ∀ belongs to `symbol' script, but the xfont backend didn't
> support :script font property. That is because I was afraid
> that it made the font listing extremely slow (we must open
> all iso10646-1 fonts to check if it supports the requested
> characters). Actually my trial implementation of :script
> property supports took more than 1 minute to display HELLO
> file.
1 minute would be a problem, indeed.
> But, if we can use this heuristic:
> X fonts that have the same property values except for
> size related properties supports the same set of
> characters on all display. For example, all these fonts
> -adobe-courier-medium-r-normal--8-80-75-75-m-50-iso10646-1
> -adobe-courier-medium-r-normal--10-100-75-75-m-60-iso10646-1
> -adobe-courier-medium-r-normal--11-80-100-100-m-60-iso10646-1
> -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso10646-1
> -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
> -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
> -adobe-courier-medium-r-normal--17-120-100-100-m-100-iso10646-1
> -adobe-courier-medium-r-normal--18-180-75-75-m-110-iso10646-1
> -adobe-courier-medium-r-normal--20-140-100-100-m-110-iso10646-1
> -adobe-courier-medium-r-normal--24-240-75-75-m-150-iso10646-1
> -adobe-courier-medium-r-normal--25-180-100-100-m-150-iso10646-1
> -adobe-courier-medium-r-normal--34-240-100-100-m-200-iso10646-1
> suports the same set of characters.
That assumption is obviously not guaranteed to hold, and I don't think
it really holds in practice, but it looks like an acceptable tradeoff,
since the cases where it doesn't hold shouldn't be too frequent.
> we can list fonts in a realistic time. Attached is the
> patch to try it. Could you please test it? As the change
> is not simple, I have not yet installed it.
I tried it on my smallest machine, and it seems fast enough: C-h h takes
approximately the same amount of time with it than it did under Emacs-22.3
(around 3s to 4s).
[ And this even though the Emacs-22.3 I used was built with -O2 and
such, whereas my Emacs-CVS is built with -O1, USE_LISP_UNION_TYPE,
ENABLE_CHECKING, and a few additional runtime tests. ]
The machines I used to test it were all running Debian testing, with
a fairly standard set of fonts. I don't know how it would behave for
people with many more fonts installed (most of which would presumably
be scalable and hence wouldn't be affected by the heuristic).
> -static Lisp_Object xfont_list_pattern P_ ((Lisp_Object, Display *, char *));
> +static int xfont_chars_supported P_ ((Lisp_Object, XFontStruct *,
> + struct charset *, struct charset *));
Please just use ANSI-style declarations rather than K&R in new code.
> + /* Two special cases to avoid opening rather big fonts. */
> + if (AREF (props, 2), Qja)
> + return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil));
> + if (AREF (props, 2), Qko)
> + return Fcons (intern ("hangul"), Qnil);
You need EQ (..) around those two tests.
> + if (NILP (val))
> + script = Qnil;
> + else
> + script = XCDR (val);
Aka: script = CDR (val);
> + if (! repertory && NILP (xfont_scripts_cache))
> + {
> + Lisp_Object args[2];
> +
> + args[0] = QCtest;
> + args[1] = Qequal;
> + xfont_scripts_cache = Fmake_hash_table (2, args);
> + }
[...]
> @@ -996,6 +1173,8 @@
> void
> syms_of_xfont ()
> {
> + staticpro (&xfont_scripts_cache);
> + xfont_scripts_cache = Qnil;
> xfont_driver.type = Qx;
> register_font_driver (&xfont_driver, NULL);
> }
Why not just:
@@ -996,6 +1173,8 @@
void
syms_of_xfont ()
{
+ staticpro (&xfont_scripts_cache);
+ {
+ Lisp_Object args[2];
+ args[0] = QCtest;
+ args[1] = Qequal;
+ xfont_scripts_cache = Fmake_hash_table (2, args);
+ }
xfont_driver.type = Qx;
register_font_driver (&xfont_driver, NULL);
}
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-20 19:43 ` Stefan Monnier
@ 2009-05-21 1:15 ` Kenichi Handa
2009-05-21 11:26 ` Kenichi Handa
2009-05-21 14:52 ` Stefan Monnier
0 siblings, 2 replies; 10+ messages in thread
From: Kenichi Handa @ 2009-05-21 1:15 UTC (permalink / raw)
To: Stefan Monnier; +Cc: cyd, 2667
In article <jwvbppnefy5.fsf-monnier+emacsbugreports@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> > But, if we can use this heuristic:
> > X fonts that have the same property values except for
> > size related properties supports the same set of
> > characters on all display. For example, all these fonts
[...]
> That assumption is obviously not guaranteed to hold, and I
> don't think it really holds in practice, but it looks like
> an acceptable tradeoff, since the cases where it doesn't
> hold shouldn't be too frequent.
So, you mean that we should install that change, right?
> > -static Lisp_Object xfont_list_pattern P_ ((Lisp_Object, Display *, char *));
> > +static int xfont_chars_supported P_ ((Lisp_Object, XFontStruct *,
> > + struct charset *, struct charset *));
> Please just use ANSI-style declarations rather than K&R in new code.
Ah, I didn't realize that we switched to ANSI-style.
> > + /* Two special cases to avoid opening rather big fonts. */
> > + if (AREF (props, 2), Qja)
> > + return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil));
> > + if (AREF (props, 2), Qko)
> > + return Fcons (intern ("hangul"), Qnil);
> You need EQ (..) around those two tests.
Of course, sorry for the incorrect patch.
> > + if (NILP (val))
> > + script = Qnil;
> > + else
> > + script = XCDR (val);
> Aka: script = CDR (val);
Ok. I didn't know CDR macro.
> > + if (! repertory && NILP (xfont_scripts_cache))
> > + {
> > + Lisp_Object args[2];
> > +
> > + args[0] = QCtest;
> > + args[1] = Qequal;
> > + xfont_scripts_cache = Fmake_hash_table (2, args);
> > + }
> [...]
> > @@ -996,6 +1173,8 @@
> > void
> > syms_of_xfont ()
> > {
> > + staticpro (&xfont_scripts_cache);
> > + xfont_scripts_cache = Qnil;
> > xfont_driver.type = Qx;
> > register_font_driver (&xfont_driver, NULL);
> > }
> Why not just:
> @@ -996,6 +1173,8 @@
> void
> syms_of_xfont ()
> {
> + staticpro (&xfont_scripts_cache);
> + {
> + Lisp_Object args[2];
> + args[0] = QCtest;
> + args[1] = Qequal;
> + xfont_scripts_cache = Fmake_hash_table (2, args);
> + }
> xfont_driver.type = Qx;
> register_font_driver (&xfont_driver, NULL);
> }
I usually hesitate using a Lisp symbol Qxxxx in syms_of_XXX
if I don't know where it is initialized, and wanted to avoid
increasing the temacs size where possible.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-21 1:15 ` Kenichi Handa
@ 2009-05-21 11:26 ` Kenichi Handa
2009-05-21 14:52 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Kenichi Handa @ 2009-05-21 11:26 UTC (permalink / raw)
To: 2667; +Cc: cyd, monnier, 2667
In article <E1M6wt2-0001YM-IL@etlken>, Kenichi Handa <handa@m17n.org> writes:
> In article <jwvbppnefy5.fsf-monnier+emacsbugreports@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> > > But, if we can use this heuristic:
> > > X fonts that have the same property values except for
> > > size related properties supports the same set of
> > > characters on all display. For example, all these fonts
> [...]
> > That assumption is obviously not guaranteed to hold, and I
> > don't think it really holds in practice, but it looks like
> > an acceptable tradeoff, since the cases where it doesn't
> > hold shouldn't be too frequent.
> So, you mean that we should install that change, right?
As Yidong said "go ahead", I've just installed the change
(with slight modifications).
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2667: Still seeing inconsistent fonts
2009-05-21 1:15 ` Kenichi Handa
2009-05-21 11:26 ` Kenichi Handa
@ 2009-05-21 14:52 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2009-05-21 14:52 UTC (permalink / raw)
To: Kenichi Handa; +Cc: cyd, 2667
> I usually hesitate using a Lisp symbol Qxxxx in syms_of_XXX
> if I don't know where it is initialized, and wanted to avoid
> increasing the temacs size where possible.
Since syms_of_<fontbackend> are all called very late, it's safe.
Marginally increasing the temacs size is a non-issue in the light of the
resulting code simplification.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-05-21 14:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08 3:41 bug#2667: Still seeing inconsistent fonts Chong Yidong
2009-05-08 19:58 ` Stefan Monnier
2009-05-11 12:21 ` Kenichi Handa
2009-05-11 15:56 ` Chong Yidong
2009-05-11 17:23 ` Stefan Monnier
2009-05-20 19:43 ` Stefan Monnier
2009-05-21 1:15 ` Kenichi Handa
2009-05-21 11:26 ` Kenichi Handa
2009-05-21 14:52 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2009-05-06 4:17 Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).