Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6a04614b
Commit
6a04614b
authored
Jun 16, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the standard font path to look for TrueType fonts.
parent
4dfabb0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
truetype.c
dlls/wineps/truetype.c
+28
-28
No files found.
dlls/wineps/truetype.c
View file @
6a04614b
...
@@ -583,19 +583,17 @@ static BOOL ReadTrueTypeDir(FT_Library library, LPCSTR dirname)
...
@@ -583,19 +583,17 @@ static BOOL ReadTrueTypeDir(FT_Library library, LPCSTR dirname)
*/
*/
BOOL
PSDRV_GetTrueTypeMetrics
(
void
)
BOOL
PSDRV_GetTrueTypeMetrics
(
void
)
{
{
CHAR
name_buf
[
256
],
value_buf
[
256
];
static
const
WCHAR
pathW
[]
=
{
'P'
,
'a'
,
't'
,
'h'
,
0
};
INT
i
=
0
;
FT_Error
error
;
FT_Error
error
;
FT_Library
library
;
FT_Library
library
;
HKEY
hkey
;
HKEY
hkey
;
DWORD
type
,
name_len
,
value_len
;
DWORD
len
;
LPWSTR
valueW
;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\TrueType Font Directories */
LPSTR
valueA
,
ptr
;
if
(
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
TrueType Font Directories"
,
0
,
KEY_READ
,
&
hkey
)
!=
ERROR_SUCCESS
)
return
TRUE
;
/* @@ Wine registry key: HKCU\Software\Wine\Fonts */
if
(
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Fonts"
,
&
hkey
)
!=
ERROR_SUCCESS
)
return
TRUE
;
ft_handle
=
wine_dlopen
(
SONAME_LIBFREETYPE
,
RTLD_NOW
,
NULL
,
0
);
ft_handle
=
wine_dlopen
(
SONAME_LIBFREETYPE
,
RTLD_NOW
,
NULL
,
0
);
if
(
!
ft_handle
)
{
if
(
!
ft_handle
)
{
...
@@ -631,25 +629,27 @@ BOOL PSDRV_GetTrueTypeMetrics(void)
...
@@ -631,25 +629,27 @@ BOOL PSDRV_GetTrueTypeMetrics(void)
return
FALSE
;
return
FALSE
;
}
}
name_len
=
sizeof
(
name_buf
);
if
(
RegQueryValueExW
(
hkey
,
pathW
,
NULL
,
NULL
,
NULL
,
&
len
)
==
ERROR_SUCCESS
)
value_len
=
sizeof
(
value_buf
);
while
(
RegEnumValueA
(
hkey
,
i
++
,
name_buf
,
&
name_len
,
NULL
,
&
type
,
value_buf
,
&
value_len
)
==
ERROR_SUCCESS
)
{
{
value_buf
[
sizeof
(
value_buf
)
-
1
]
=
'\0'
;
len
+=
sizeof
(
WCHAR
);
valueW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
ReadTrueTypeDir
(
library
,
value_buf
)
==
FALSE
)
if
(
RegQueryValueExW
(
hkey
,
pathW
,
NULL
,
NULL
,
(
LPBYTE
)
valueW
,
&
len
)
==
ERROR_SUCCESS
)
{
{
RegCloseKey
(
hkey
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
valueW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
pFT_Done_FreeType
(
library
);
valueA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
return
FALSE
;
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
valueW
,
-
1
,
valueA
,
len
,
NULL
,
NULL
);
}
TRACE
(
"got font path %s
\n
"
,
debugstr_a
(
valueA
)
);
ptr
=
valueA
;
/* initialize lengths for new iteration */
while
(
ptr
)
{
name_len
=
sizeof
(
name_buf
);
LPSTR
next
=
strchr
(
ptr
,
':'
);
value_len
=
sizeof
(
value_buf
);
if
(
next
)
*
next
++
=
0
;
ReadTrueTypeDir
(
library
,
ptr
);
ptr
=
next
;
}
HeapFree
(
GetProcessHeap
(),
0
,
valueA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
valueW
);
}
}
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
...
...
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