• R/O
  • SSH
  • HTTPS

tortoisesvn: コミット


コミットメタ情報

リビジョン28963 (tree)
日時2020-09-15 02:59:03
作者stefankueng

ログメッセージ

use DrawText instead of ExtTextOut because DrawText uses fallback fonts if a char can't be drawn in the selected font.

変更サマリ

差分

--- trunk/src/TortoiseMerge/BaseView.cpp (revision 28962)
+++ trunk/src/TortoiseMerge/BaseView.cpp (revision 28963)
@@ -1463,8 +1463,10 @@
14631463 int offset = std::min<int>(m_nOffsetChar, (nStringLength-rect.Width())/GetCharWidth()+1);
14641464 sViewTitle = m_sWindowName.Mid(offset);
14651465 }
1466- pdc->ExtTextOut(std::max<int>(rect.left + (rect.Width()-nStringLength)/2, 1),
1467- rect.top + (HEADERHEIGHT / 2), ETO_CLIPPED, textrect, sViewTitle, nullptr);
1466+ RECT titleRC = textrect;
1467+ titleRC.left = std::max<int>(rect.left + (rect.Width() - nStringLength) / 2, 1);
1468+ titleRC.top = rect.top + (HEADERHEIGHT / 2);
1469+ pdc->DrawText(sViewTitle, &titleRC, DT_HIDEPREFIX | DT_NOPREFIX | DT_SINGLELINE);
14681470 if (this->GetFocus() == this)
14691471 pdc->DrawEdge(textrect, EDGE_BUMP, BF_RECT);
14701472 else
@@ -1981,7 +1983,10 @@
19811983 leftcoord += lower > 0 ? posBuffer.get()[lower - 1] : 0;
19821984 }
19831985
1984- pDC->ExtTextOut(leftcoord, coords.y, ETO_CLIPPED, &rc, p_zBlockText+offset, min(nTextLength, 4094), nullptr);
1986+ RECT drawRC = rc;
1987+ drawRC.left = leftcoord;
1988+ drawRC.top = coords.y;
1989+ pDC->DrawText(p_zBlockText + offset, min(nTextLength, 4094), &drawRC, DT_HIDEPREFIX | DT_NOPREFIX | DT_SINGLELINE);
19851990 if ((second.shot != second.background) && (itStart->first == nStart + nTextOffset))
19861991 {
19871992 pDC->FillSolidRect(nLeft-1, rc.top, 1, rc.Height(), second.shot);
旧リポジトリブラウザで表示