Jean-Christophe Cardot : winhlp32: Prepare winhlp32 for more font types.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 12 10:20:47 CDT 2016


Module: wine
Branch: master
Commit: 5200dc9b05c5919c9d03b34f75f63c544ba0d372
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5200dc9b05c5919c9d03b34f75f63c544ba0d372

Author: Jean-Christophe Cardot <wine at cardot.net>
Date:   Sun Apr 10 22:06:10 2016 +0200

winhlp32: Prepare winhlp32 for more font types.

Signed-off-by: Jean-Christophe Cardot <wine at cardot.net>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/winhlp32/hlpfile.c | 20 ++++++++++++++++++++
 programs/winhlp32/hlpfile.h |  3 +++
 2 files changed, 23 insertions(+)

diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c
index b3106ff..141af62 100644
--- a/programs/winhlp32/hlpfile.c
+++ b/programs/winhlp32/hlpfile.c
@@ -1865,6 +1865,26 @@ static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile)
     hlpfile->fonts = HeapAlloc(GetProcessHeap(), 0, sizeof(HLPFILE_FONT) * dscr_num);
 
     len = (dscr_offset - face_offset) / face_num;
+
+    /* mvb font */
+    if (face_offset >= 16)
+    {
+        hlpfile->scale = 1;
+        hlpfile->rounderr = 0;
+        WINE_FIXME("mvb font: not implemented\n");
+        return FALSE;
+    }
+    /* new font */
+    if (face_offset >= 12)
+    {
+        hlpfile->scale = 1;
+        hlpfile->rounderr = 0;
+        WINE_FIXME("new font: not implemented\n");
+        return FALSE;
+    }
+    /* old font */
+    hlpfile->scale = 10;
+    hlpfile->rounderr = 5;
 /* EPP     for (i = face_offset; i < dscr_offset; i += len) */
 /* EPP         WINE_FIXME("[%d]: %*s\n", i / len, len, ref + i); */
     for (i = 0; i < dscr_num; i++)
diff --git a/programs/winhlp32/hlpfile.h b/programs/winhlp32/hlpfile.h
index 6c40c3a..55ef681 100644
--- a/programs/winhlp32/hlpfile.h
+++ b/programs/winhlp32/hlpfile.h
@@ -149,6 +149,9 @@ typedef struct tagHlpFileFile
     COLORREF                    popup_color;
 
     LPSTR                       help_on_file;
+
+    int                         scale;
+    int                         rounderr;
 } HLPFILE;
 
 /*




More information about the wine-cvs mailing list