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
fe81deae
Commit
fe81deae
authored
Dec 01, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Make fonts installed in Fonts dir accessible through system collection.
parent
6eba688f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
font.c
dlls/dwrite/font.c
+19
-6
No files found.
dlls/dwrite/font.c
View file @
fe81deae
...
...
@@ -1660,8 +1660,8 @@ static HRESULT WINAPI systemfontfileenumerator_GetCurrentFontFile(IDWriteFontFil
{
struct
system_fontfile_enumerator
*
enumerator
=
impl_from_IDWriteFontFileEnumerator
(
iface
);
DWORD
ret
,
type
,
count
;
WCHAR
*
filename
;
HRESULT
hr
;
BYTE
*
data
;
*
file
=
NULL
;
...
...
@@ -1671,17 +1671,30 @@ static HRESULT WINAPI systemfontfileenumerator_GetCurrentFontFile(IDWriteFontFil
if
(
RegEnumValueW
(
enumerator
->
hkey
,
enumerator
->
index
,
NULL
,
NULL
,
NULL
,
&
type
,
NULL
,
&
count
))
return
E_FAIL
;
if
(
!
(
data
=
heap_alloc
(
count
)))
if
(
!
(
filename
=
heap_alloc
(
count
)))
return
E_OUTOFMEMORY
;
ret
=
RegEnumValueW
(
enumerator
->
hkey
,
enumerator
->
index
,
NULL
,
NULL
,
NULL
,
&
type
,
data
,
&
count
);
ret
=
RegEnumValueW
(
enumerator
->
hkey
,
enumerator
->
index
,
NULL
,
NULL
,
NULL
,
&
type
,
(
BYTE
*
)
filename
,
&
count
);
if
(
ret
)
{
heap_free
(
data
);
heap_free
(
filename
);
return
E_FAIL
;
}
hr
=
IDWriteFactory_CreateFontFileReference
(
enumerator
->
factory
,
(
WCHAR
*
)
data
,
NULL
,
file
);
heap_free
(
data
);
/* Fonts installed in 'Fonts' system dir don't get full path in registry font files cache */
if
(
!
strchrW
(
filename
,
'\\'
))
{
static
const
WCHAR
fontsW
[]
=
{
'\\'
,
'f'
,
'o'
,
'n'
,
't'
,
's'
,
'\\'
,
0
};
WCHAR
fullpathW
[
MAX_PATH
];
GetWindowsDirectoryW
(
fullpathW
,
sizeof
(
fullpathW
)
/
sizeof
(
WCHAR
));
strcatW
(
fullpathW
,
fontsW
);
strcatW
(
fullpathW
,
filename
);
hr
=
IDWriteFactory_CreateFontFileReference
(
enumerator
->
factory
,
fullpathW
,
NULL
,
file
);
}
else
hr
=
IDWriteFactory_CreateFontFileReference
(
enumerator
->
factory
,
filename
,
NULL
,
file
);
heap_free
(
filename
);
return
hr
;
}
...
...
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