This commit is contained in:
Vincent Wei
2019-02-21 12:07:02 +08:00
parent 0c0becc780
commit 848c1d7ce1
2 changed files with 23 additions and 13 deletions
+3 -1
View File
@@ -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
+20 -12
View File
@@ -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;
}
}