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
c0c7547f
Commit
c0c7547f
authored
Apr 02, 2012
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Improve font cache.
parent
c52d7acf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
freetype.c
dlls/gdi32/freetype.c
+6
-16
No files found.
dlls/gdi32/freetype.c
View file @
c0c7547f
...
...
@@ -484,10 +484,9 @@ static const WCHAR wine_fonts_key[] = {'S','o','f','t','w','a','r','e','\\','W',
static
const
WCHAR
wine_fonts_cache_key
[]
=
{
'C'
,
'a'
,
'c'
,
'h'
,
'e'
,
0
};
static
const
WCHAR
english_name_value
[]
=
{
'E'
,
'n'
,
'g'
,
'l'
,
'i'
,
's'
,
'h'
,
' '
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
face_index_value
[]
=
{
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
static
const
WCHAR
face_italic_value
[]
=
{
'I'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
face_bold_value
[]
=
{
'B'
,
'o'
,
'l'
,
'd'
,
0
};
static
const
WCHAR
face_ntmflags_value
[]
=
{
'N'
,
't'
,
'm'
,
'f'
,
'l'
,
'a'
,
'g'
,
's'
,
0
};
static
const
WCHAR
face_version_value
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
face_
external_value
[]
=
{
'E'
,
'x'
,
't'
,
'e'
,
'r'
,
'n
'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
face_
vertical_value
[]
=
{
'V'
,
'e'
,
'r'
,
't'
,
'i'
,
'c
'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
face_height_value
[]
=
{
'H'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
face_width_value
[]
=
{
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
static
const
WCHAR
face_size_value
[]
=
{
'S'
,
'i'
,
'z'
,
'e'
,
0
};
...
...
@@ -1316,7 +1315,6 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family)
key of a bunch of non-scalable strikes */
if
(
RegQueryValueExA
(
hkey_face
,
"File Name"
,
NULL
,
NULL
,
NULL
,
&
needed
)
==
ERROR_SUCCESS
)
{
DWORD
italic
,
bold
;
Face
*
face
;
face
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
face
));
face
->
cached_enum_data
=
NULL
;
...
...
@@ -1325,7 +1323,6 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family)
RegQueryValueExA
(
hkey_face
,
"File Name"
,
NULL
,
NULL
,
(
BYTE
*
)
face
->
file
,
&
needed
);
face
->
StyleName
=
strdupW
(
face_name
);
face
->
vertical
=
(
family
->
FamilyName
[
0
]
==
'@'
);
if
(
RegQueryValueExW
(
hkey_face
,
face_full_name_value
,
NULL
,
NULL
,
NULL
,
&
needed
)
==
ERROR_SUCCESS
)
{
...
...
@@ -1337,10 +1334,9 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family)
face
->
FullName
=
NULL
;
reg_load_dword
(
hkey_face
,
face_index_value
,
(
DWORD
*
)
&
face
->
face_index
);
reg_load_dword
(
hkey_face
,
face_italic_value
,
&
italic
);
reg_load_dword
(
hkey_face
,
face_bold_value
,
&
bold
);
reg_load_dword
(
hkey_face
,
face_ntmflags_value
,
&
face
->
ntmFlags
);
reg_load_dword
(
hkey_face
,
face_version_value
,
(
DWORD
*
)
&
face
->
font_version
);
reg_load_dword
(
hkey_face
,
face_
external_value
,
(
DWORD
*
)
&
face
->
extern
al
);
reg_load_dword
(
hkey_face
,
face_
vertical_value
,
(
DWORD
*
)
&
face
->
vertic
al
);
needed
=
sizeof
(
face
->
fs
);
RegQueryValueExW
(
hkey_face
,
face_font_sig_value
,
NULL
,
NULL
,
(
BYTE
*
)
&
face
->
fs
,
&
needed
);
...
...
@@ -1364,11 +1360,6 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family)
face
->
size
.
x_ppem
>>
6
,
face
->
size
.
y_ppem
>>
6
);
}
face
->
ntmFlags
=
0
;
if
(
italic
)
face
->
ntmFlags
|=
NTM_ITALIC
;
if
(
bold
)
face
->
ntmFlags
|=
NTM_BOLD
;
if
(
face
->
ntmFlags
==
0
)
face
->
ntmFlags
=
NTM_REGULAR
;
TRACE
(
"fsCsb = %08x %08x/%08x %08x %08x %08x
\n
"
,
face
->
fs
.
fsCsb
[
0
],
face
->
fs
.
fsCsb
[
1
],
face
->
fs
.
fsUsb
[
0
],
face
->
fs
.
fsUsb
[
1
],
...
...
@@ -1517,10 +1508,9 @@ static void add_face_to_cache(Face *face)
(
strlenW
(
face
->
FullName
)
+
1
)
*
sizeof
(
WCHAR
));
reg_save_dword
(
hkey_face
,
face_index_value
,
face
->
face_index
);
reg_save_dword
(
hkey_face
,
face_italic_value
,
(
face
->
ntmFlags
&
NTM_ITALIC
)
!=
0
);
reg_save_dword
(
hkey_face
,
face_bold_value
,
(
face
->
ntmFlags
&
NTM_BOLD
)
!=
0
);
reg_save_dword
(
hkey_face
,
face_ntmflags_value
,
face
->
ntmFlags
);
reg_save_dword
(
hkey_face
,
face_version_value
,
face
->
font_version
);
reg_save_dword
(
hkey_face
,
face_
external_value
,
face
->
extern
al
);
reg_save_dword
(
hkey_face
,
face_
vertical_value
,
face
->
vertic
al
);
RegSetValueExW
(
hkey_face
,
face_font_sig_value
,
0
,
REG_BINARY
,
(
BYTE
*
)
&
face
->
fs
,
sizeof
(
face
->
fs
));
...
...
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