comparison src/xfont.c @ 91270:0dab56b22dca

(xfont_encode_char): Use the macro FONT_INVALID_CODE.
author Kenichi Handa <handa@m17n.org>
date Tue, 25 Dec 2007 10:31:10 +0000
parents 26541bdcecd0
children 8d25c5588e59
comparison
equal deleted inserted replaced
91269:421d7c7d296a 91270:0dab56b22dca
715 XChar2b char2b; 715 XChar2b char2b;
716 716
717 charset = CHARSET_FROM_ID (font->encoding_charset); 717 charset = CHARSET_FROM_ID (font->encoding_charset);
718 code = ENCODE_CHAR (charset, c); 718 code = ENCODE_CHAR (charset, c);
719 if (code == CHARSET_INVALID_CODE (charset)) 719 if (code == CHARSET_INVALID_CODE (charset))
720 return 0xFFFFFFFF; 720 return FONT_INVALID_CODE;
721 if (font->repertory_charset >= 0) 721 if (font->repertory_charset >= 0)
722 { 722 {
723 charset = CHARSET_FROM_ID (font->repertory_charset); 723 charset = CHARSET_FROM_ID (font->repertory_charset);
724 return (ENCODE_CHAR (charset, c) != CHARSET_INVALID_CODE (charset) 724 return (ENCODE_CHAR (charset, c) != CHARSET_INVALID_CODE (charset)
725 ? code : 0xFFFFFFFF); 725 ? code : FONT_INVALID_CODE);
726 } 726 }
727 char2b.byte1 = code >> 8; 727 char2b.byte1 = code >> 8;
728 char2b.byte2 = code & 0xFF; 728 char2b.byte2 = code & 0xFF;
729 return (xfont_get_pcm (font->font.font, &char2b) ? code : 0xFFFFFFFF); 729 return (xfont_get_pcm (font->font.font, &char2b) ? code : FONT_INVALID_CODE);
730 } 730 }
731 731
732 static int 732 static int
733 xfont_text_extents (font, code, nglyphs, metrics) 733 xfont_text_extents (font, code, nglyphs, metrics)
734 struct font *font; 734 struct font *font;