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
87c2581c
Commit
87c2581c
authored
Aug 16, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use Microsoft and Unicode encodings in priority for font names.
parent
537d8091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
freetype.c
dlls/gdi32/freetype.c
+7
-4
No files found.
dlls/gdi32/freetype.c
View file @
87c2581c
...
...
@@ -1306,10 +1306,12 @@ static inline WORD get_mac_code_page( const FT_SfntName *name )
static
int
match_name_table_language
(
const
FT_SfntName
*
name
,
LANGID
lang
)
{
LANGID
name_lang
;
int
res
=
0
;
switch
(
name
->
platform_id
)
{
case
TT_PLATFORM_MICROSOFT
:
res
+=
5
;
/* prefer the Microsoft name */
switch
(
name
->
encoding_id
)
{
case
TT_MS_ID_UNICODE_CS
:
...
...
@@ -1326,6 +1328,7 @@ static int match_name_table_language( const FT_SfntName *name, LANGID lang )
name_lang
=
mac_langid_table
[
name
->
language_id
];
break
;
case
TT_PLATFORM_APPLE_UNICODE
:
res
+=
2
;
/* prefer Unicode encodings */
switch
(
name
->
encoding_id
)
{
case
TT_APPLE_ID_DEFAULT
:
...
...
@@ -1341,10 +1344,10 @@ static int match_name_table_language( const FT_SfntName *name, LANGID lang )
default:
return
0
;
}
if
(
name_lang
==
lang
)
re
turn
3
;
if
(
PRIMARYLANGID
(
name_lang
)
==
PRIMARYLANGID
(
lang
))
return
2
;
if
(
name_lang
==
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_DEFAULT
))
return
1
;
return
0
;
if
(
name_lang
==
lang
)
re
s
+=
30
;
else
if
(
PRIMARYLANGID
(
name_lang
)
==
PRIMARYLANGID
(
lang
))
res
+=
20
;
else
if
(
name_lang
==
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_DEFAULT
))
res
+=
10
;
return
res
;
}
static
WCHAR
*
copy_name_table_string
(
const
FT_SfntName
*
name
)
...
...
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