comparison src/xfaces.c @ 51237:ed40623b1ca6

(build_scalable_font_name): Remove `unused var pixel_size' warning.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 25 May 2003 17:47:13 +0000
parents 491ca5acf5b3
children 7156fc3b3571
comparison
equal deleted inserted replaced
51236:29a68043c861 51237:ed40623b1ca6
6082 build_scalable_font_name (f, font, specified_pt) 6082 build_scalable_font_name (f, font, specified_pt)
6083 struct frame *f; 6083 struct frame *f;
6084 struct font_name *font; 6084 struct font_name *font;
6085 int specified_pt; 6085 int specified_pt;
6086 { 6086 {
6087 char point_size[20], pixel_size[20]; 6087 char pixel_size[20];
6088 int pixel_value; 6088 int pixel_value;
6089 double resy = FRAME_X_DISPLAY_INFO (f)->resy; 6089 double resy = FRAME_X_DISPLAY_INFO (f)->resy;
6090 double pt; 6090 double pt;
6091 6091
6092 /* If scalable font is for a specific resolution, compute 6092 /* If scalable font is for a specific resolution, compute
6106 pixel_value *= font->rescale_ratio; 6106 pixel_value *= font->rescale_ratio;
6107 6107
6108 /* We should keep POINT_SIZE 0. Otherwise, X server can't open a 6108 /* We should keep POINT_SIZE 0. Otherwise, X server can't open a
6109 font of the specified PIXEL_SIZE. */ 6109 font of the specified PIXEL_SIZE. */
6110 #if 0 6110 #if 0
6111 /* Set point size of the font. */ 6111 { /* Set point size of the font. */
6112 sprintf (point_size, "%d", (int) pt); 6112 char point_size[20];
6113 font->fields[XLFD_POINT_SIZE] = point_size; 6113 sprintf (point_size, "%d", (int) pt);
6114 font->numeric[XLFD_POINT_SIZE] = pt; 6114 font->fields[XLFD_POINT_SIZE] = point_size;
6115 font->numeric[XLFD_POINT_SIZE] = pt;
6116 }
6115 #endif 6117 #endif
6116 6118
6117 /* Set pixel size. */ 6119 /* Set pixel size. */
6118 sprintf (pixel_size, "%d", pixel_value); 6120 sprintf (pixel_size, "%d", pixel_value);
6119 font->fields[XLFD_PIXEL_SIZE] = pixel_size; 6121 font->fields[XLFD_PIXEL_SIZE] = pixel_size;