diff --git a/include/gdi.h b/include/gdi.h index 24fc1d50..c7d42c08 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -10821,7 +10821,9 @@ typedef struct _GLYPHPOS { * \param logfont_sideways The buffer to store the LOGFONT object created * by this function for sideways glyphs if text orientation specified * in \a render_flags is mixed (GRF_TEXT_ORIENTATION_MIXED) or - * sideways (GRF_TEXT_ORIENTATION_SIDEWAYS). + * sideways (GRF_TEXT_ORIENTATION_SIDEWAYS). If *logfont_sidways is + * not NULL, this function will try to use this LOGFONT object for + * sideways glyphs. * * \return The number of glyphs which can be fit to the maximal extent. * The extent info of every glyphs which are fit in the maximal extent diff --git a/src/newgdi/glyph-css.c b/src/newgdi/glyph-css.c index d66a6903..9e38185f 100644 --- a/src/newgdi/glyph-css.c +++ b/src/newgdi/glyph-css.c @@ -2811,18 +2811,26 @@ int GUIAPI GetGlyphsExtentPointEx(LOGFONT* logfont_upright, if (logfont_upright == NULL || logfont_upright->rotation != 0) return 0; - if ((render_flags & GRF_WRITING_MODE_MASK) - != GRF_WRITING_MODE_HORIZONTAL_TB) { - switch (render_flags & GRF_TEXT_ORIENTATION_MASK) { - case GRF_TEXT_ORIENTATION_MIXED: - case GRF_TEXT_ORIENTATION_SIDEWAYS: - *logfont_sideways = create_sideways_logfont(logfont_upright); - if (*logfont_sideways == NULL) - return 0; - break; - default: - *logfont_sideways = NULL; - break; + if (*logfont_sideways == NULL) { + if ((render_flags & GRF_WRITING_MODE_MASK) + != GRF_WRITING_MODE_HORIZONTAL_TB) { + switch (render_flags & GRF_TEXT_ORIENTATION_MASK) { + case GRF_TEXT_ORIENTATION_MIXED: + case GRF_TEXT_ORIENTATION_SIDEWAYS: + *logfont_sideways = create_sideways_logfont(logfont_upright); + if (*logfont_sideways == NULL + || (*logfont_sideways)->rotation == 900) + return 0; + break; + default: + *logfont_sideways = NULL; + break; + } + } + } + else { + if ((*logfont_sideways)->rotation != 900) { + return 0; } }