Mercurial > emacs
comparison src/font.c @ 100167:b80052504b85
Handle fonts with corrupted size specs, i.e. non-int and non-float.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 03 Dec 2008 05:16:38 +0000 |
parents | 7add351b47c9 |
children | d704965776e6 |
comparison
equal
deleted
inserted
replaced
100166:03bc92681181 | 100167:b80052504b85 |
---|---|
3082 val = Ffont_get (spec, QCdpi); | 3082 val = Ffont_get (spec, QCdpi); |
3083 if (! NILP (val)) | 3083 if (! NILP (val)) |
3084 dpi = XINT (val); | 3084 dpi = XINT (val); |
3085 point = PIXEL_TO_POINT (XINT (AREF (spec, FONT_SIZE_INDEX)) * 10, | 3085 point = PIXEL_TO_POINT (XINT (AREF (spec, FONT_SIZE_INDEX)) * 10, |
3086 dpi); | 3086 dpi); |
3087 attrs[LFACE_HEIGHT_INDEX] = make_number (point); | |
3087 } | 3088 } |
3088 else if (FLOATP (AREF (spec, FONT_SIZE_INDEX))) | 3089 else if (FLOATP (AREF (spec, FONT_SIZE_INDEX))) |
3089 point = XFLOAT_DATA (AREF (spec, FONT_SIZE_INDEX)) * 10; | 3090 { |
3090 attrs[LFACE_HEIGHT_INDEX] = make_number (point); | 3091 point = XFLOAT_DATA (AREF (spec, FONT_SIZE_INDEX)) * 10; |
3092 attrs[LFACE_HEIGHT_INDEX] = make_number (point); | |
3093 } | |
3091 } | 3094 } |
3092 } | 3095 } |
3093 | 3096 |
3094 | 3097 |
3095 /* Return a font-entity satisfying SPEC and best matching with face's | 3098 /* Return a font-entity satisfying SPEC and best matching with face's |