[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [MD:7461] 非 TrueType フォントの bold 表示について



On 9/11/06, 白井秀行 Hideyuki SHIRAI <shirai@xxxxxxxxxxx> wrote:
> しかし、r4612 がいつもの VC++6.0 で make できませんでした。

変数宣言が標準Cで許されない使い方をしていますね。
これでコンパイルできるほうがおかしいと思います。
以下の修正でよいかと。(r4163としてcommit済み)

---------------------
Index: mw32font.c
===================================================================
--- mw32font.c	(revision 4162)
+++ mw32font.c	(working copy)
@@ -398,6 +398,10 @@
 	{
 	  HFONT hf_normal;
 	  LOGFONT logf_normal = *plogf;
+	  HDC hdc;
+	  HANDLE oldobj;
+	  TEXTMETRIC tm_normal;
+	  int flag;

 	  /* For bold string in non TrueType font, the value of
 	     overhang includes offset of overstrike. */
@@ -409,11 +413,6 @@
 	      return 0;
 	    }

-	  HDC hdc;
-	  HANDLE oldobj;
-	  TEXTMETRIC tm_normal;
-	  int flag;
-
 	  hdc = GET_FRAME_HDC (f);
 	  oldobj = SelectObject (hdc, hf_normal);
 	  flag = GetTextMetrics (hdc, &tm_normal);
---------------------

-- Shun-ichi GOTO