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
8ef70039
Commit
8ef70039
authored
Oct 26, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Oct 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Simplify the code for charmap selection.
parent
79a30a4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
freetype.c
dlls/gdi32/freetype.c
+16
-10
No files found.
dlls/gdi32/freetype.c
View file @
8ef70039
...
...
@@ -4408,6 +4408,21 @@ static BOOL freetype_DeleteDC( PHYSDEV dev )
return
TRUE
;
}
static
FT_Encoding
pick_charmap
(
FT_Face
face
,
int
charset
)
{
static
const
FT_Encoding
regular_order
[]
=
{
FT_ENCODING_UNICODE
,
FT_ENCODING_APPLE_ROMAN
,
0
};
static
const
FT_Encoding
symbol_order
[]
=
{
FT_ENCODING_MS_SYMBOL
,
FT_ENCODING_UNICODE
,
FT_ENCODING_APPLE_ROMAN
,
0
};
const
FT_Encoding
*
encs
=
regular_order
;
if
(
charset
==
SYMBOL_CHARSET
)
encs
=
symbol_order
;
while
(
*
encs
!=
0
)
{
if
(
select_charmap
(
face
,
*
encs
))
break
;
encs
++
;
}
return
*
encs
;
}
/*************************************************************
* freetype_SelectFont
...
...
@@ -4824,16 +4839,7 @@ found_face:
ret
->
ntmFlags
=
face
->
ntmFlags
;
if
(
ret
->
charset
==
SYMBOL_CHARSET
&&
select_charmap
(
ret
->
ft_face
,
FT_ENCODING_MS_SYMBOL
))
{
/* No ops */
}
else
if
(
select_charmap
(
ret
->
ft_face
,
FT_ENCODING_UNICODE
))
{
/* No ops */
}
else
{
select_charmap
(
ret
->
ft_face
,
FT_ENCODING_APPLE_ROMAN
);
}
pick_charmap
(
ret
->
ft_face
,
ret
->
charset
);
ret
->
orientation
=
FT_IS_SCALABLE
(
ret
->
ft_face
)
?
lf
.
lfOrientation
:
0
;
ret
->
name
=
psub
?
strdupW
(
psub
->
from
.
name
)
:
strdupW
(
family
->
FamilyName
);
...
...
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