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
7894c1e8
Commit
7894c1e8
authored
Jun 27, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved AFM dirs configuration to a single AFMPath key under
HKCU\Software\Wine\Fonts.
parent
ab3d0794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
26 deletions
+32
-26
type1afm.c
dlls/wineps/type1afm.c
+32
-26
No files found.
dlls/wineps/type1afm.c
View file @
7894c1e8
...
...
@@ -1172,35 +1172,41 @@ static BOOL ReadAFMDir(LPCSTR dirname)
*/
BOOL
PSDRV_GetType1Metrics
(
void
)
{
CHAR
name_buf
[
256
],
value_buf
[
256
];
INT
i
=
0
;
HKEY
hkey
;
DWORD
type
,
name_len
,
value_len
;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\afmdirs */
if
(
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
afmdirs"
,
0
,
KEY_READ
,
&
hkey
)
!=
ERROR_SUCCESS
)
return
TRUE
;
static
const
WCHAR
pathW
[]
=
{
'A'
,
'F'
,
'M'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
HKEY
hkey
;
DWORD
len
;
LPWSTR
valueW
;
LPSTR
valueA
,
ptr
;
name_len
=
sizeof
(
name_buf
);
value_len
=
sizeof
(
value_buf
);
/* @@ Wine registry key: HKCU\Software\Wine\Fonts */
if
(
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Fonts"
,
&
hkey
)
!=
ERROR_SUCCESS
)
return
TRUE
;
while
(
RegEnumValueA
(
hkey
,
i
++
,
name_buf
,
&
name_len
,
NULL
,
&
type
,
value_buf
,
&
value_len
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
pathW
,
NULL
,
NULL
,
NULL
,
&
len
)
==
ERROR_SUCCESS
)
{
value_buf
[
sizeof
(
value_buf
)
-
1
]
=
'\0'
;
if
(
ReadAFMDir
(
value_buf
)
==
FALSE
)
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
/* initialize lengths for new iteration */
name_len
=
sizeof
(
name_buf
);
value_len
=
sizeof
(
value_buf
);
len
+=
sizeof
(
WCHAR
);
valueW
=
HeapAlloc
(
PSDRV_Heap
,
0
,
len
);
if
(
RegQueryValueExW
(
hkey
,
pathW
,
NULL
,
NULL
,
(
LPBYTE
)
valueW
,
&
len
)
==
ERROR_SUCCESS
)
{
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
valueW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
valueA
=
HeapAlloc
(
PSDRV_Heap
,
0
,
len
);
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
valueW
,
-
1
,
valueA
,
len
,
NULL
,
NULL
);
TRACE
(
"got AFM font path %s
\n
"
,
debugstr_a
(
valueA
)
);
ptr
=
valueA
;
while
(
ptr
)
{
LPSTR
next
=
strchr
(
ptr
,
':'
);
if
(
next
)
*
next
++
=
0
;
if
(
!
ReadAFMDir
(
ptr
))
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
ptr
=
next
;
}
HeapFree
(
PSDRV_Heap
,
0
,
valueA
);
}
HeapFree
(
PSDRV_Heap
,
0
,
valueW
);
}
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