font structure. Use selected_frame until the API
is updated to pass in a frame. */
f = XFRAME (selected_frame);
-
+
dc = get_frame_dc (f);
old_font = SelectObject (dc, FONT_COMPAT (font)->hfont);
}
/* Foundry is difficult to get in readable form on Windows.
But Emacs crashes if it is not set, so set it to something more
- generic. These values make xflds compatible with Emacs 22. */
+ generic. These values make xlfds compatible with Emacs 22. */
if (lf->lfOutPrecision == OUT_STRING_PRECIS)
tem = Qraster;
else if (lf->lfOutPrecision == OUT_STROKE_PRECIS)
logfont->lfPitchAndFamily = family | DEFAULT_PITCH;
}
-
+
/* Set pitch based on the spacing property. */
tmp = AREF (font_spec, FONT_SPACING_INDEX);
if (INTEGERP (tmp))
if (NILP (family))
continue;
else if (SYMBOLP (family))
- name = SDATA (SYMBOL_NAME (family));
+ name = SDATA (SYMBOL_NAME (family));
else
continue;
}
-static void compute_metrics (dc, w32_font, code, metrics)
+static void
+compute_metrics (dc, w32_font, code, metrics)
HDC dc;
struct w32font_info *w32_font;
unsigned int code;
metrics->width = gm.gmCellIncX;
metrics->status = W32METRIC_SUCCESS;
}
- else
+ else if (w32_font->glyph_idx)
{
- if (w32_font->glyph_idx)
- {
- /* Can't use glyph indexes after all.
- Avoid it in future, and clear any metrics that were based on
- glyph indexes. */
- w32_font->glyph_idx = 0;
- clear_cached_metrics (w32_font);
- }
- else
- metrics->status = W32METRIC_FAIL;
+ /* Can't use glyph indexes after all.
+ Avoid it in future, and clear any metrics that were based on
+ glyph indexes. */
+ w32_font->glyph_idx = 0;
+ clear_cached_metrics (w32_font);
}
+ else
+ metrics->status = W32METRIC_FAIL;
}
static void