diff options
| author | Kenichi Handa | 2011-12-05 16:48:29 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-12-05 16:48:29 +0900 |
| commit | c3c9e25e5d2c222d9f79a503c714b48c06078c08 (patch) | |
| tree | 7ca4793321c2a2d67c235e7cf6cfb67a7e7cb2a0 /src | |
| parent | 2ab04b956544fc24132cee405f93c1a757ebca56 (diff) | |
| download | emacs-c3c9e25e5d2c222d9f79a503c714b48c06078c08.tar.gz emacs-c3c9e25e5d2c222d9f79a503c714b48c06078c08.zip | |
ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil (Bug#8046, Bug#10193).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/ftfont.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 69e3eda2630..d897fadd292 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2011-12-05 Kenichi Handa <handa@m17n.org> | 1 | 2011-12-05 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, | ||
| 4 | return Qnil (Bug#8046, Bug#10193). | ||
| 5 | |||
| 6 | 2011-12-05 Kenichi Handa <handa@m17n.org> | ||
| 7 | |||
| 3 | * coding.c (encode_designation_at_bol): New args charbuf_end and | 8 | * coding.c (encode_designation_at_bol): New args charbuf_end and |
| 4 | dst. Return the number of produced bytes. Callers changed. | 9 | dst. Return the number of produced bytes. Callers changed. |
| 5 | (coding_set_source): Return how many bytes coding->source was | 10 | (coding_set_source): Return how many bytes coding->source was |
diff --git a/src/ftfont.c b/src/ftfont.c index c48346b0147..ec1a4ca6a78 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -164,6 +164,13 @@ get_adstyle_property (FcPattern *p) | |||
| 164 | char *str, *end; | 164 | char *str, *end; |
| 165 | Lisp_Object adstyle; | 165 | Lisp_Object adstyle; |
| 166 | 166 | ||
| 167 | #ifdef FC_FONTFORMAT | ||
| 168 | if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch) | ||
| 169 | && (xstrcasecmp ((char *) fcstr, "bdf") != 0 | ||
| 170 | || xstrcasecmp ((char *) fcstr, "pcf") != 0)) | ||
| 171 | /* Not a BDF nor PCF font. */ | ||
| 172 | return Qnil; | ||
| 173 | #endif | ||
| 167 | if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) | 174 | if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) |
| 168 | return Qnil; | 175 | return Qnil; |
| 169 | str = (char *) fcstr; | 176 | str = (char *) fcstr; |