mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 03:41:46 +00:00
[FONTSUB] Import from Wine Staging 1.9.13. CORE-11219
svn path=/trunk/; revision=71873
This commit is contained in:
parent
995a10c899
commit
647586b9d5
6 changed files with 147 additions and 0 deletions
|
@ -41,6 +41,7 @@ add_subdirectory(esent)
|
||||||
add_subdirectory(faultrep)
|
add_subdirectory(faultrep)
|
||||||
add_subdirectory(fltlib)
|
add_subdirectory(fltlib)
|
||||||
add_subdirectory(fmifs)
|
add_subdirectory(fmifs)
|
||||||
|
add_subdirectory(fontsub)
|
||||||
add_subdirectory(framedyn)
|
add_subdirectory(framedyn)
|
||||||
add_subdirectory(fusion)
|
add_subdirectory(fusion)
|
||||||
add_subdirectory(gdiplus)
|
add_subdirectory(gdiplus)
|
||||||
|
|
14
reactos/dll/win32/fontsub/CMakeLists.txt
Normal file
14
reactos/dll/win32/fontsub/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
add_definitions(-D__WINESRC__)
|
||||||
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
||||||
|
spec2def(fontsub.dll fontsub.spec)
|
||||||
|
|
||||||
|
add_library(fontsub SHARED
|
||||||
|
main.c
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/fontsub_stubs.c
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/fontsub.def)
|
||||||
|
|
||||||
|
set_module_type(fontsub win32dll)
|
||||||
|
target_link_libraries(fontsub wine)
|
||||||
|
add_importlibs(fontsub msvcrt kernel32 ntdll)
|
||||||
|
add_cd_file(TARGET fontsub DESTINATION reactos/system32 FOR all)
|
2
reactos/dll/win32/fontsub/fontsub.spec
Normal file
2
reactos/dll/win32/fontsub/fontsub.spec
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
@ cdecl CreateFontPackage(ptr long ptr ptr ptr long long long long long long ptr long ptr ptr ptr ptr)
|
||||||
|
@ stub MergeFontPackage
|
65
reactos/dll/win32/fontsub/main.c
Normal file
65
reactos/dll/win32/fontsub/main.c
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2014 Nikolay Sivov for CodeWeavers
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "fontsub.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(fontsub);
|
||||||
|
|
||||||
|
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
{
|
||||||
|
TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
|
||||||
|
|
||||||
|
switch (fdwReason) {
|
||||||
|
case DLL_WINE_PREATTACH:
|
||||||
|
return FALSE; /* prefer native version */
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
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, const unsigned short encoding,
|
||||||
|
const unsigned short *keep_list, const unsigned short keep_len, CFP_ALLOCPROC allocproc,
|
||||||
|
CFP_REALLOCPROC reallocproc, CFP_FREEPROC freeproc, void *reserved)
|
||||||
|
{
|
||||||
|
FIXME("(%p %u %p %p %p %#x %u %u %u %u %u %p %u %p %p %p %p): stub\n", src, src_len, dest, dest_len,
|
||||||
|
written, flags, face_index, format, lang, platform, encoding, keep_list, keep_len, allocproc,
|
||||||
|
reallocproc, freeproc, reserved);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
|
@ -67,6 +67,7 @@ reactos/dll/win32/dbghelp # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/dciman32 # Synced to WineStaging-1.9.11
|
reactos/dll/win32/dciman32 # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/faultrep # Synced to WineStaging-1.9.11
|
reactos/dll/win32/faultrep # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/fltlib # Synced to WineStaging-1.9.11
|
reactos/dll/win32/fltlib # Synced to WineStaging-1.9.11
|
||||||
|
reactos/dll/win32/fontsub # Synced to WineStaging-1.9.13
|
||||||
reactos/dll/win32/fusion # Synced to WineStaging-1.9.11
|
reactos/dll/win32/fusion # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/gdiplus # Synced to WineStaging-1.9.11
|
reactos/dll/win32/gdiplus # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-1.9.11
|
reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-1.9.11
|
||||||
|
|
64
reactos/sdk/include/psdk/fontsub.h
Normal file
64
reactos/sdk/include/psdk/fontsub.h
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2016 Nikolay Sivov for CodeWeavers
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_FONTSUB_H
|
||||||
|
#define __WINE_FONTSUB_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
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
|
||||||
|
#define TTFCFP_SUBSET1 1
|
||||||
|
#define TTFCFP_DELTA 2
|
||||||
|
|
||||||
|
#define TTFCFP_UNICODE_PLATFORMID 0
|
||||||
|
#define TTFCFP_APPLE_PLATFORMID 1
|
||||||
|
#define TTFCFP_ISO_PLATFORMID 2
|
||||||
|
#define TTFCFP_MS_PLATFORMID 3
|
||||||
|
|
||||||
|
#define TTFCFP_STD_MAC_CHAR_SET 0
|
||||||
|
#define TTFCFP_SYMBOL_CHAR_SET 0
|
||||||
|
#define TTFCFP_UNICODE_CHAR_SET 1
|
||||||
|
#define TTFCFP_DONT_CARE 0xffff
|
||||||
|
|
||||||
|
#define TTFCFP_LANG_KEEP_ALL 0
|
||||||
|
|
||||||
|
#define TTFCFP_FLAGS_SUBSET 0x0001
|
||||||
|
#define TTFCFP_FLAGS_COMPRESS 0x0002
|
||||||
|
#define TTFCFP_FLAGS_TTC 0x0004
|
||||||
|
#define TTFCFP_FLAGS_GLYPHLIST 0x0008
|
||||||
|
|
||||||
|
#define ERR_GENERIC 1000
|
||||||
|
#define ERR_MEM 1005
|
||||||
|
|
||||||
|
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,
|
||||||
|
const unsigned short encoding, const unsigned short *keep_list, const unsigned short keep_len,
|
||||||
|
CFP_ALLOCPROC allocproc, CFP_REALLOCPROC reallocproc, CFP_FREEPROC freeproc, void *reserved);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue