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
882398b0
Commit
882398b0
authored
Dec 11, 2013
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Dec 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Return ANSI character code as glyph index for bitmap fonts.
parent
bfafb1ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
freetype.c
dlls/gdi32/freetype.c
+30
-2
No files found.
dlls/gdi32/freetype.c
View file @
882398b0
...
...
@@ -5998,7 +5998,7 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
}
else
ret
=
pFT_Get_Char_Index
(
font
->
ft_face
,
(
unsigned
char
)
buf
);
TRACE
(
"%04x (%02x) -> ret %d def_used %d
\n
"
,
glyph
,
buf
,
ret
,
default_used
);
TRACE
(
"%04x (%02x) -> ret %d def_used %d
\n
"
,
glyph
,
(
unsigned
char
)
buf
,
ret
,
default_used
);
return
ret
;
}
...
...
@@ -6015,6 +6015,34 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
return
glyphId
;
}
/* helper for freetype_GetGlyphIndices */
static
FT_UInt
get_gdi_glyph_index
(
const
GdiFont
*
font
,
UINT
glyph
)
{
WCHAR
wc
=
(
WCHAR
)
glyph
;
BOOL
default_used
=
FALSE
;
BOOL
*
default_used_pointer
=
NULL
;
FT_UInt
ret
;
char
buf
;
if
(
font
->
ft_face
->
charmap
->
encoding
!=
FT_ENCODING_NONE
)
return
get_glyph_index
(
font
,
glyph
);
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
)
{
if
(
font
->
codepage
==
CP_SYMBOL
&&
wc
<
0x100
)
ret
=
(
unsigned
char
)
wc
;
else
ret
=
0
;
}
else
ret
=
(
unsigned
char
)
buf
;
TRACE
(
"%04x (%02x) -> ret %d def_used %d
\n
"
,
glyph
,
(
unsigned
char
)
buf
,
ret
,
default_used
);
return
ret
;
}
static
FT_UInt
get_default_char_index
(
GdiFont
*
font
)
{
FT_UInt
default_char
;
...
...
@@ -6061,7 +6089,7 @@ static DWORD freetype_GetGlyphIndices( PHYSDEV dev, LPCWSTR lpstr, INT count, LP
for
(
i
=
0
;
i
<
count
;
i
++
)
{
pgi
[
i
]
=
get_glyph_index
(
physdev
->
font
,
lpstr
[
i
]);
pgi
[
i
]
=
get_g
di_g
lyph_index
(
physdev
->
font
,
lpstr
[
i
]);
if
(
pgi
[
i
]
==
0
)
{
if
(
!
got_default
)
...
...
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