diff options
| author | Chong Yidong | 2012-08-16 14:57:48 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-08-16 14:57:48 +0800 |
| commit | a2d1936838348d0a29e4a64f545180276f30cb99 (patch) | |
| tree | 255711fef7b06fc76b5fad6101b5880cb9a86ca6 /src | |
| parent | 179dad8ed18677af1251493751e3c9de4c80ee43 (diff) | |
| download | emacs-a2d1936838348d0a29e4a64f545180276f30cb99.tar.gz emacs-a2d1936838348d0a29e4a64f545180276f30cb99.zip | |
* gtkutil.c (xg_get_font): Demand an Xft font.
Fixes: debbugs:3228
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/gtkutil.c | 7 | ||||
| -rw-r--r-- | src/xftfont.c | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 54215f59f8e..663035077bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-08-16 Chong Yidong <cyd@gnu.org> | 1 | 2012-08-16 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228). | ||
| 4 | |||
| 3 | * xfont.c (xfont_open): | 5 | * xfont.c (xfont_open): |
| 4 | * xftfont.c (xftfont_open): Set the font's max_width field. | 6 | * xftfont.c (xftfont_open): Set the font's max_width field. |
| 5 | 7 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6638f375a2c..a4de47f073c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -2016,7 +2016,7 @@ xg_get_file_name (FRAME_PTR f, | |||
| 2016 | 2016 | ||
| 2017 | #if USE_NEW_GTK_FONT_CHOOSER | 2017 | #if USE_NEW_GTK_FONT_CHOOSER |
| 2018 | 2018 | ||
| 2019 | extern Lisp_Object Qnormal; | 2019 | extern Lisp_Object Qxft, Qnormal; |
| 2020 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | 2020 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; |
| 2021 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | 2021 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; |
| 2022 | extern Lisp_Object Qoblique, Qitalic; | 2022 | extern Lisp_Object Qoblique, Qitalic; |
| @@ -2099,7 +2099,7 @@ xg_get_font (FRAME_PTR f, const char *default_name) | |||
| 2099 | 2099 | ||
| 2100 | if (desc) | 2100 | if (desc) |
| 2101 | { | 2101 | { |
| 2102 | Lisp_Object args[8]; | 2102 | Lisp_Object args[10]; |
| 2103 | const char *name = pango_font_description_get_family (desc); | 2103 | const char *name = pango_font_description_get_family (desc); |
| 2104 | gint size = pango_font_description_get_size (desc); | 2104 | gint size = pango_font_description_get_size (desc); |
| 2105 | PangoWeight weight = pango_font_description_get_weight (desc); | 2105 | PangoWeight weight = pango_font_description_get_weight (desc); |
| @@ -2117,6 +2117,9 @@ xg_get_font (FRAME_PTR f, const char *default_name) | |||
| 2117 | args[6] = QCslant; | 2117 | args[6] = QCslant; |
| 2118 | args[7] = XG_STYLE_TO_SYMBOL (style); | 2118 | args[7] = XG_STYLE_TO_SYMBOL (style); |
| 2119 | 2119 | ||
| 2120 | args[8] = QCtype; | ||
| 2121 | args[9] = Qxft; | ||
| 2122 | |||
| 2120 | font = Ffont_spec (8, args); | 2123 | font = Ffont_spec (8, args); |
| 2121 | 2124 | ||
| 2122 | pango_font_description_free (desc); | 2125 | pango_font_description_free (desc); |
diff --git a/src/xftfont.c b/src/xftfont.c index 34c6a8fa0b4..5e60ab0c4d3 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -39,7 +39,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 39 | 39 | ||
| 40 | /* Xft font driver. */ | 40 | /* Xft font driver. */ |
| 41 | 41 | ||
| 42 | static Lisp_Object Qxft; | 42 | Lisp_Object Qxft; |
| 43 | static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden, | 43 | static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden, |
| 44 | QClcdfilter; | 44 | QClcdfilter; |
| 45 | 45 | ||