comparison src/w32term.c @ 52392:ea78742dd7ca

(w32_per_char_metric): Allow cached metrics to be returned even when font_type is unknown.
author Jason Rumney <jasonr@gnu.org>
date Sun, 31 Aug 2003 22:15:15 +0000
parents c631ebcc0df9
children 3978cfc630d9
comparison
equal deleted inserted replaced
52391:1ef98df61d74 52392:ea78742dd7ca
893 /* The result metric information. */ 893 /* The result metric information. */
894 XCharStruct *pcm; 894 XCharStruct *pcm;
895 BOOL retval; 895 BOOL retval;
896 896
897 xassert (font && char2b); 897 xassert (font && char2b);
898 xassert (font_type != UNKNOWN_FONT);
899 898
900 /* Handle the common cases quickly. */ 899 /* Handle the common cases quickly. */
901 if (!font->bdf && font->per_char == NULL) 900 if (!font->bdf && font->per_char == NULL)
902 /* TODO: determine whether char2b exists in font? */ 901 /* TODO: determine whether char2b exists in font? */
903 return &font->max_bounds; 902 return &font->max_bounds;
904 else if (!font->bdf && *char2b < 128) 903 else if (!font->bdf && *char2b < 128)
905 return &font->per_char[*char2b]; 904 return &font->per_char[*char2b];
905
906 xassert (font_type != UNKNOWN_FONT);
906 907
907 pcm = &font->scratch; 908 pcm = &font->scratch;
908 909
909 if (font_type == BDF_1D_FONT) 910 if (font_type == BDF_1D_FONT)
910 retval = w32_bdf_per_char_metric (font, char2b, 1, pcm); 911 retval = w32_bdf_per_char_metric (font, char2b, 1, pcm);