mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch to improve fontsub.CreateFontPackage stub implementation.
This commit is contained in:
parent
52c70bd232
commit
95899b69cc
@ -0,0 +1,57 @@
|
||||
From 66cc3c66e8dca93421c13edfbbf36a0f2a241487 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
Date: Fri, 22 Apr 2016 17:56:48 +0300
|
||||
Subject: fontsub: CreateFontPackage() straight copy
|
||||
|
||||
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
---
|
||||
dlls/fontsub/main.c | 13 ++++++++++++-
|
||||
include/fontsub.h | 3 +++
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/fontsub/main.c b/dlls/fontsub/main.c
|
||||
index b78bd58..a0a6032 100644
|
||||
--- a/dlls/fontsub/main.c
|
||||
+++ b/dlls/fontsub/main.c
|
||||
@@ -50,5 +50,16 @@ ULONG __cdecl CreateFontPackage(const unsigned char *src, const ULONG src_len, u
|
||||
written, flags, face_index, format, lang, platform, encoding, keep_list, keep_len, allocproc,
|
||||
reallocproc, freeproc, reserved);
|
||||
|
||||
- return ERR_GENERIC;
|
||||
+ if (format != TTFCFP_SUBSET)
|
||||
+ return ERR_GENERIC;
|
||||
+
|
||||
+ *dest = allocproc(src_len);
|
||||
+ if (!*dest)
|
||||
+ return ERR_MEM;
|
||||
+
|
||||
+ memcpy(*dest, src, src_len);
|
||||
+ *dest_len = src_len;
|
||||
+ *written = src_len;
|
||||
+
|
||||
+ return NO_ERROR;
|
||||
}
|
||||
diff --git a/include/fontsub.h b/include/fontsub.h
|
||||
index 6fc7793..b5c77e3 100644
|
||||
--- a/include/fontsub.h
|
||||
+++ b/include/fontsub.h
|
||||
@@ -27,6 +27,8 @@ typedef void *(__cdecl *CFP_ALLOCPROC)(size_t);
|
||||
typedef void *(__cdecl *CFP_REALLOCPROC)(void *, size_t);
|
||||
typedef void (__cdecl *CFP_FREEPROC)(void *);
|
||||
|
||||
+#define TTFCFP_SUBSET 0
|
||||
+
|
||||
ULONG __cdecl CreateFontPackage(const unsigned char *src, const ULONG src_len, unsigned char **dest,
|
||||
ULONG *dest_len, ULONG *written, const unsigned short flags, const unsigned short face_index,
|
||||
const unsigned short format, const unsigned short lang, const unsigned short platform,
|
||||
@@ -34,6 +36,7 @@ ULONG __cdecl CreateFontPackage(const unsigned char *src, const ULONG src_len, u
|
||||
CFP_ALLOCPROC allocproc, CFP_REALLOCPROC reallocproc, CFP_FREEPROC freeproc, void *reserved);
|
||||
|
||||
#define ERR_GENERIC 1000
|
||||
+#define ERR_MEM 1005
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
--
|
||||
2.8.0
|
||||
|
1
patches/fontsub-CreateFontPackage/definition
Normal file
1
patches/fontsub-CreateFontPackage/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [40517] Improve fontsub.CreateFontPackage stub implementation
|
@ -144,6 +144,7 @@ patch_enable_all ()
|
||||
enable_dxva2_Video_Decoder="$1"
|
||||
enable_explorer_Video_Registry_Key="$1"
|
||||
enable_fonts_Missing_Fonts="$1"
|
||||
enable_fontsub_CreateFontPackage="$1"
|
||||
enable_fsutil_Stub_Program="$1"
|
||||
enable_gdi32_Lazy_Font_Initialization="$1"
|
||||
enable_gdi32_MultiMonitor="$1"
|
||||
@ -603,6 +604,9 @@ patch_enable ()
|
||||
fonts-Missing_Fonts)
|
||||
enable_fonts_Missing_Fonts="$2"
|
||||
;;
|
||||
fontsub-CreateFontPackage)
|
||||
enable_fontsub_CreateFontPackage="$2"
|
||||
;;
|
||||
fsutil-Stub_Program)
|
||||
enable_fsutil_Stub_Program="$2"
|
||||
;;
|
||||
@ -3633,6 +3637,21 @@ if test "$enable_fonts_Missing_Fonts" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset fontsub-CreateFontPackage
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#40517] Improve fontsub.CreateFontPackage stub implementation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/fontsub/main.c, include/fontsub.h
|
||||
# |
|
||||
if test "$enable_fontsub_CreateFontPackage" -eq 1; then
|
||||
patch_apply fontsub-CreateFontPackage/0001-fontsub-CreateFontPackage-straight-copy.patch
|
||||
(
|
||||
echo '+ { "Nikolay Sivov", "fontsub: CreateFontPackage() straight copy.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset fsutil-Stub_Program
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
Reference in New Issue
Block a user