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
e0693a18
Commit
e0693a18
authored
Mar 12, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Factor out FreeType initialization into a separate function.
parent
9dd61548
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
34 deletions
+42
-34
freetype.c
dlls/gdi32/freetype.c
+42
-34
No files found.
dlls/gdi32/freetype.c
View file @
e0693a18
...
...
@@ -2163,28 +2163,9 @@ static void update_font_info(void)
FIXME
(
"there is no font defaults for codepages %u,%u
\n
"
,
ansi_cp
,
oem_cp
);
}
/*************************************************************
* WineEngInit
*
* Initialize FreeType library and create a list of available faces
*/
BOOL
WineEngInit
(
void
)
{
static
const
WCHAR
dot_fonW
[]
=
{
'.'
,
'f'
,
'o'
,
'n'
,
'\0'
};
static
const
WCHAR
pathW
[]
=
{
'P'
,
'a'
,
't'
,
'h'
,
0
};
HKEY
hkey
;
DWORD
valuelen
,
datalen
,
i
=
0
,
type
,
dlen
,
vlen
;
LPVOID
data
;
WCHAR
windowsdir
[
MAX_PATH
];
char
*
unixname
;
HANDLE
font_mutex
;
const
char
*
data_dir
;
TRACE
(
"
\n
"
);
/* update locale dependent font info in registry */
update_font_info
();
static
BOOL
init_freetype
(
void
)
{
ft_handle
=
wine_dlopen
(
SONAME_LIBFREETYPE
,
RTLD_NOW
,
NULL
,
0
);
if
(
!
ft_handle
)
{
WINE_MESSAGE
(
...
...
@@ -2219,7 +2200,7 @@ BOOL WineEngInit(void)
LOAD_FUNCPTR
(
FT_Vector_Transform
)
#undef LOAD_FUNCPTR
/* Don't warn if th
is one is
missing */
/* Don't warn if th
ese ones are
missing */
pFT_Library_Version
=
wine_dlsym
(
ft_handle
,
"FT_Library_Version"
,
NULL
,
0
);
pFT_Load_Sfnt_Table
=
wine_dlsym
(
ft_handle
,
"FT_Load_Sfnt_Table"
,
NULL
,
0
);
pFT_Get_First_Char
=
wine_dlsym
(
ft_handle
,
"FT_Get_First_Char"
,
NULL
,
0
);
...
...
@@ -2241,11 +2222,10 @@ BOOL WineEngInit(void)
ft_handle
=
NULL
;
return
FALSE
;
}
FT_Version
.
major
=
FT_Version
.
minor
=
FT_Version
.
patch
=
-
1
;
FT_Version
.
major
=
FT_Version
.
minor
=
FT_Version
.
patch
=
-
1
;
if
(
pFT_Library_Version
)
{
pFT_Library_Version
(
library
,
&
FT_Version
.
major
,
&
FT_Version
.
minor
,
&
FT_Version
.
patch
);
}
if
(
FT_Version
.
major
<=
0
)
{
FT_Version
.
major
=
2
;
...
...
@@ -2257,6 +2237,43 @@ BOOL WineEngInit(void)
((
FT_Version
.
minor
<<
8
)
&
0x00ff00
)
|
((
FT_Version
.
patch
)
&
0x0000ff
);
return
TRUE
;
sym_not_found:
WINE_MESSAGE
(
"Wine cannot find certain functions that it needs inside the FreeType
\n
"
"font library. To enable Wine to use TrueType fonts please upgrade
\n
"
"FreeType to at least version 2.0.5.
\n
"
"http://www.freetype.org
\n
"
);
wine_dlclose
(
ft_handle
,
NULL
,
0
);
ft_handle
=
NULL
;
return
FALSE
;
}
/*************************************************************
* WineEngInit
*
* Initialize FreeType library and create a list of available faces
*/
BOOL
WineEngInit
(
void
)
{
static
const
WCHAR
dot_fonW
[]
=
{
'.'
,
'f'
,
'o'
,
'n'
,
'\0'
};
static
const
WCHAR
pathW
[]
=
{
'P'
,
'a'
,
't'
,
'h'
,
0
};
HKEY
hkey
;
DWORD
valuelen
,
datalen
,
i
=
0
,
type
,
dlen
,
vlen
;
LPVOID
data
;
WCHAR
windowsdir
[
MAX_PATH
];
char
*
unixname
;
HANDLE
font_mutex
;
const
char
*
data_dir
;
TRACE
(
"
\n
"
);
/* update locale dependent font info in registry */
update_font_info
();
if
(
!
init_freetype
())
return
FALSE
;
if
((
font_mutex
=
CreateMutexW
(
NULL
,
FALSE
,
font_mutex_nameW
))
==
NULL
)
{
ERR
(
"Failed to create font mutex
\n
"
);
return
FALSE
;
...
...
@@ -2385,15 +2402,6 @@ BOOL WineEngInit(void)
ReleaseMutex
(
font_mutex
);
return
TRUE
;
sym_not_found:
WINE_MESSAGE
(
"Wine cannot find certain functions that it needs inside the FreeType
\n
"
"font library. To enable Wine to use TrueType fonts please upgrade
\n
"
"FreeType to at least version 2.0.5.
\n
"
"http://www.freetype.org
\n
"
);
wine_dlclose
(
ft_handle
,
NULL
,
0
);
ft_handle
=
NULL
;
return
FALSE
;
}
...
...
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