Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
847da79c
Commit
847da79c
authored
Apr 02, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 04, 2016
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t2embed: Implement TTIsEmbeddingEnabledForFacename().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
33765285
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
3 deletions
+75
-3
Makefile.in
dlls/t2embed/Makefile.in
+1
-1
main.c
dlls/t2embed/main.c
+46
-0
t2embed.spec
dlls/t2embed/t2embed.spec
+2
-2
t2embed.c
dlls/t2embed/tests/t2embed.c
+23
-0
t2embapi.h
include/t2embapi.h
+3
-0
No files found.
dlls/t2embed/Makefile.in
View file @
847da79c
MODULE
=
t2embed.dll
MODULE
=
t2embed.dll
IMPORTLIB
=
t2embed
IMPORTLIB
=
t2embed
IMPORTS
=
gdi32
IMPORTS
=
gdi32
advapi32
C_SRCS
=
\
C_SRCS
=
\
main.c
main.c
dlls/t2embed/main.c
View file @
847da79c
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
#include "winreg.h"
#include "t2embapi.h"
#include "t2embapi.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -100,6 +101,51 @@ LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
...
@@ -100,6 +101,51 @@ LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
return
E_NONE
;
return
E_NONE
;
}
}
LONG
WINAPI
TTIsEmbeddingEnabledForFacename
(
LPCSTR
facename
,
BOOL
*
enabled
)
{
static
const
WCHAR
exclusionlistW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'S'
,
'h'
,
'a'
,
'r'
,
'e'
,
'd'
,
' '
,
'T'
,
'o'
,
'o'
,
'l'
,
's'
,
'\\'
,
't'
,
'2'
,
'e'
,
'm'
,
'b'
,
'e'
,
'd'
,
0
};
DWORD
index
;
HKEY
hkey
;
LONG
ret
;
TRACE
(
"(%s %p)
\n
"
,
debugstr_a
(
facename
),
enabled
);
if
(
!
facename
)
return
E_FACENAMEINVALID
;
if
(
!
enabled
)
return
E_PBENABLEDINVALID
;
*
enabled
=
TRUE
;
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
exclusionlistW
,
0
,
GENERIC_READ
,
&
hkey
))
return
E_NONE
;
*
enabled
=
TRUE
;
ret
=
ERROR_SUCCESS
;
index
=
0
;
while
(
ret
!=
ERROR_NO_MORE_ITEMS
)
{
DWORD
name_len
,
value_len
,
value
,
type
;
CHAR
name
[
LF_FACESIZE
];
name_len
=
sizeof
(
name
)
/
sizeof
(
*
name
);
value_len
=
sizeof
(
value
);
ret
=
RegEnumValueA
(
hkey
,
index
++
,
name
,
&
name_len
,
NULL
,
&
type
,
(
BYTE
*
)
&
value
,
&
value_len
);
if
(
ret
||
type
!=
REG_DWORD
)
continue
;
if
(
!
lstrcmpiA
(
name
,
facename
))
{
*
enabled
=
!!
value
;
break
;
}
}
RegCloseKey
(
hkey
);
return
E_NONE
;
}
LONG
WINAPI
TTIsEmbeddingEnabled
(
HDC
hDC
,
BOOL
*
enabled
)
LONG
WINAPI
TTIsEmbeddingEnabled
(
HDC
hDC
,
BOOL
*
enabled
)
{
{
FIXME
(
"(%p %p) stub
\n
"
,
hDC
,
enabled
);
FIXME
(
"(%p %p) stub
\n
"
,
hDC
,
enabled
);
...
...
dlls/t2embed/t2embed.spec
View file @
847da79c
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
@ stub TTGetEmbeddedFontInfo
@ stub TTGetEmbeddedFontInfo
@ stdcall TTGetEmbeddingType(long ptr)
@ stdcall TTGetEmbeddingType(long ptr)
@ stdcall TTIsEmbeddingEnabled(long ptr)
@ stdcall TTIsEmbeddingEnabled(long ptr)
@ st
ub TTIsEmbeddingEnabledForFacename
@ st
dcall TTIsEmbeddingEnabledForFacename(str ptr)
@ stdcall TTLoadEmbeddedFont(ptr long ptr long ptr ptr ptr wstr str ptr)
@ stdcall TTLoadEmbeddedFont(ptr long ptr long ptr ptr ptr wstr str ptr)
@ stub TTRunValidationTests
@ stub TTRunValidationTests
@ stub _TTCharToUnicode@24
@ stub _TTCharToUnicode@24
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
@ stub _TTGetEmbeddedFontInfo@28
@ stub _TTGetEmbeddedFontInfo@28
@ stdcall _TTGetEmbeddingType@8(long ptr) TTGetEmbeddingType
@ stdcall _TTGetEmbeddingType@8(long ptr) TTGetEmbeddingType
@ stdcall _TTIsEmbeddingEnabled@8(long ptr) TTIsEmbeddingEnabled
@ stdcall _TTIsEmbeddingEnabled@8(long ptr) TTIsEmbeddingEnabled
@ st
ub _TTIsEmbeddingEnabledForFacename@8
@ st
dcall _TTIsEmbeddingEnabledForFacename@8(str ptr) TTIsEmbeddingEnabledForFacename
@ stdcall _TTLoadEmbeddedFont@40(ptr long ptr long ptr ptr ptr wstr str ptr) TTLoadEmbeddedFont
@ stdcall _TTLoadEmbeddedFont@40(ptr long ptr long ptr ptr ptr wstr str ptr) TTLoadEmbeddedFont
@ stub _TTRunValidationTests@8
@ stub _TTRunValidationTests@8
@ stub TTEmbedFontEx
@ stub TTEmbedFontEx
...
...
dlls/t2embed/tests/t2embed.c
View file @
847da79c
...
@@ -76,7 +76,30 @@ static void test_TTGetEmbeddingType(void)
...
@@ -76,7 +76,30 @@ static void test_TTGetEmbeddingType(void)
DeleteDC
(
hdc
);
DeleteDC
(
hdc
);
}
}
static
void
test_TTIsEmbeddingEnabledForFacename
(
void
)
{
BOOL
status
;
LONG
ret
;
ret
=
TTIsEmbeddingEnabledForFacename
(
NULL
,
NULL
);
ok
(
ret
==
E_FACENAMEINVALID
,
"got %#x
\n
"
,
ret
);
status
=
123
;
ret
=
TTIsEmbeddingEnabledForFacename
(
NULL
,
&
status
);
ok
(
ret
==
E_FACENAMEINVALID
,
"got %#x
\n
"
,
ret
);
ok
(
status
==
123
,
"got %d
\n
"
,
status
);
ret
=
TTIsEmbeddingEnabledForFacename
(
"Arial"
,
NULL
);
ok
(
ret
==
E_PBENABLEDINVALID
,
"got %#x
\n
"
,
ret
);
status
=
123
;
ret
=
TTIsEmbeddingEnabledForFacename
(
"Arial"
,
&
status
);
ok
(
ret
==
E_NONE
,
"got %#x
\n
"
,
ret
);
ok
(
status
!=
123
,
"got %d
\n
"
,
status
);
}
START_TEST
(
t2embed
)
START_TEST
(
t2embed
)
{
{
test_TTGetEmbeddingType
();
test_TTGetEmbeddingType
();
test_TTIsEmbeddingEnabledForFacename
();
}
}
include/t2embapi.h
View file @
847da79c
...
@@ -42,7 +42,9 @@ extern "C" {
...
@@ -42,7 +42,9 @@ extern "C" {
#define E_HDCINVALID __MSABI_LONG(0x0006)
#define E_HDCINVALID __MSABI_LONG(0x0006)
#define E_NOTATRUETYPEFONT __MSABI_LONG(0x000a)
#define E_NOTATRUETYPEFONT __MSABI_LONG(0x000a)
#define E_ERRORACCESSINGFONTDATA __MSABI_LONG(0x000c)
#define E_ERRORACCESSINGFONTDATA __MSABI_LONG(0x000c)
#define E_FACENAMEINVALID __MSABI_LONG(0x0113)
#define E_PERMISSIONSINVALID __MSABI_LONG(0x0117)
#define E_PERMISSIONSINVALID __MSABI_LONG(0x0117)
#define E_PBENABLEDINVALID __MSABI_LONG(0x0118)
typedef
ULONG
(
WINAPIV
*
READEMBEDPROC
)(
void
*
,
void
*
,
ULONG
);
typedef
ULONG
(
WINAPIV
*
READEMBEDPROC
)(
void
*
,
void
*
,
ULONG
);
typedef
ULONG
(
WINAPIV
*
WRITEEMBEDPROC
)(
void
*
,
void
*
,
ULONG
);
typedef
ULONG
(
WINAPIV
*
WRITEEMBEDPROC
)(
void
*
,
void
*
,
ULONG
);
...
@@ -72,6 +74,7 @@ LONG WINAPI TTDeleteEmbeddedFont(HANDLE,ULONG,ULONG*);
...
@@ -72,6 +74,7 @@ LONG WINAPI TTDeleteEmbeddedFont(HANDLE,ULONG,ULONG*);
#define EMBED_NOEMBEDDING 4
#define EMBED_NOEMBEDDING 4
LONG
WINAPI
TTGetEmbeddingType
(
HDC
,
ULONG
*
);
LONG
WINAPI
TTGetEmbeddingType
(
HDC
,
ULONG
*
);
LONG
WINAPI
TTIsEmbeddingEnabledForFacename
(
LPCSTR
facename
,
BOOL
*
enabled
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Vitaly Lipatov
@lav
mentioned in commit
cc0b8336
·
Sep 03, 2020
mentioned in commit
cc0b8336
mentioned in commit cc0b8336f5eb15224ced5d424bb17125a7dc5d1c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment