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
1ef9a6db
Commit
1ef9a6db
authored
Jan 13, 2006
by
David Moore
Committed by
Alexandre Julliard
Jan 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Fix display of fonts using Symbol codepages and assorted other
codepages.
parent
05d079a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
freetype.c
dlls/gdi/freetype.c
+25
-1
No files found.
dlls/gdi/freetype.c
View file @
1ef9a6db
...
@@ -2679,14 +2679,38 @@ static void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt)
...
@@ -2679,14 +2679,38 @@ static void FTVectorToPOINTFX(FT_Vector *vec, POINTFX *pt)
return
;
return
;
}
}
/***************************************************
* According to the MSDN documentation on WideCharToMultiByte,
* certain codepages cannot set the default_used parameter.
* This returns TRUE if the codepage can set that parameter, false else
* so that calls to WideCharToMultiByte don't fail with ERROR_INVALID_PARAMETER
*/
static
BOOL
codepage_sets_default_used
(
UINT
codepage
)
{
switch
(
codepage
)
{
case
CP_UTF7
:
case
CP_UTF8
:
case
CP_SYMBOL
:
return
FALSE
;
default:
return
TRUE
;
}
}
static
FT_UInt
get_glyph_index
(
GdiFont
font
,
UINT
glyph
)
static
FT_UInt
get_glyph_index
(
GdiFont
font
,
UINT
glyph
)
{
{
if
(
font
->
ft_face
->
charmap
->
encoding
==
FT_ENCODING_NONE
)
{
if
(
font
->
ft_face
->
charmap
->
encoding
==
FT_ENCODING_NONE
)
{
WCHAR
wc
=
(
WCHAR
)
glyph
;
WCHAR
wc
=
(
WCHAR
)
glyph
;
BOOL
default_used
;
BOOL
default_used
;
BOOL
*
default_used_pointer
;
FT_UInt
ret
;
FT_UInt
ret
;
char
buf
;
char
buf
;
if
(
!
WideCharToMultiByte
(
font
->
codepage
,
0
,
&
wc
,
1
,
&
buf
,
sizeof
(
buf
),
NULL
,
&
default_used
)
||
default_used
)
default_used_pointer
=
NULL
;
default_used
=
FALSE
;
if
(
codepage_sets_default_used
(
font
->
codepage
))
default_used_pointer
=
&
default_used
;
if
(
!
WideCharToMultiByte
(
font
->
codepage
,
0
,
&
wc
,
1
,
&
buf
,
sizeof
(
buf
),
NULL
,
default_used_pointer
)
||
default_used
)
ret
=
0
;
ret
=
0
;
else
else
ret
=
pFT_Get_Char_Index
(
font
->
ft_face
,
(
unsigned
char
)
buf
);
ret
=
pFT_Get_Char_Index
(
font
->
ft_face
,
(
unsigned
char
)
buf
);
...
...
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