comparison src/w32fns.c @ 32791:43fa65d08292

(x_to_w32_font): Initialize dpi from dpyinfo->resy.
author Jason Rumney <jasonr@gnu.org>
date Mon, 23 Oct 2000 22:11:51 +0000
parents 0574ffc14f77
children d0421102ed8c
comparison
equal deleted inserted replaced
32790:131348208699 32791:43fa65d08292
5170 else 5170 else
5171 font = x_new_font (f, XSTRING (font)->data); 5171 font = x_new_font (f, XSTRING (font)->data);
5172 } 5172 }
5173 /* Try out a font which we hope has bold and italic variations. */ 5173 /* Try out a font which we hope has bold and italic variations. */
5174 if (!STRINGP (font)) 5174 if (!STRINGP (font))
5175 font = x_new_font (f, "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1"); 5175 font = x_new_font (f, "-*-Courier New-normal-r-*-*-*-120-*-*-c-*-iso8859-1");
5176 if (! STRINGP (font)) 5176 if (! STRINGP (font))
5177 font = x_new_font (f, "-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1"); 5177 font = x_new_font (f, "-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1");
5178 /* If those didn't work, look for something which will at least work. */ 5178 /* If those didn't work, look for something which will at least work. */
5179 if (! STRINGP (font)) 5179 if (! STRINGP (font))
5180 font = x_new_font (f, "-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1"); 5180 font = x_new_font (f, "-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1");
5796 char charset_str[20], *charset, *end; 5796 char charset_str[20], *charset, *end;
5797 5797
5798 /* Extract charset part of font string. */ 5798 /* Extract charset part of font string. */
5799 if (sscanf (fontname, 5799 if (sscanf (fontname,
5800 "-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%19s", 5800 "-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%19s",
5801 charset_str) == EOF) 5801 charset_str) < 1)
5802 return CP_DEFAULT; 5802 return CP_DEFAULT;
5803 5803
5804 /* Remove leading "*-". */ 5804 /* Remove leading "*-". */
5805 if (strncmp ("*-", charset_str, 2) == 0) 5805 if (strncmp ("*-", charset_str, 2) == 0)
5806 charset = charset_str + 2; 5806 charset = charset_str + 2;
5950 { 5950 {
5951 int fields, tem; 5951 int fields, tem;
5952 char name[50], weight[20], slant, pitch, pixels[10], height[10], 5952 char name[50], weight[20], slant, pitch, pixels[10], height[10],
5953 width[10], resy[10], remainder[20]; 5953 width[10], resy[10], remainder[20];
5954 char * encoding; 5954 char * encoding;
5955 int dpi = one_w32_display_info.height_in; 5955 int dpi = one_w32_display_info.resy;
5956 5956
5957 fields = sscanf (lpxstr, 5957 fields = sscanf (lpxstr,
5958 "-%*[^-]-%49[^-]-%19[^-]-%c-%*[^-]-%*[^-]-%9[^-]-%9[^-]-%*[^-]-%9[^-]-%c-%9[^-]-%19s", 5958 "-%*[^-]-%49[^-]-%19[^-]-%c-%*[^-]-%*[^-]-%9[^-]-%9[^-]-%*[^-]-%9[^-]-%c-%9[^-]-%19s",
5959 name, weight, &slant, pixels, height, resy, &pitch, width, remainder); 5959 name, weight, &slant, pixels, height, resy, &pitch, width, remainder);
5960 if (fields == EOF) return (FALSE); 5960 if (fields == EOF) return (FALSE);