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
f6ea5c8a
Commit
f6ea5c8a
authored
May 22, 2013
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper to get the default character index.
parent
e7c3b035
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
freetype.c
dlls/gdi32/freetype.c
+20
-11
No files found.
dlls/gdi32/freetype.c
View file @
f6ea5c8a
...
...
@@ -5817,6 +5817,25 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
return
glyphId
;
}
static
FT_UInt
get_default_char_index
(
GdiFont
*
font
)
{
FT_UInt
default_char
;
if
(
FT_IS_SFNT
(
font
->
ft_face
))
{
TT_OS2
*
pOS2
=
pFT_Get_Sfnt_Table
(
font
->
ft_face
,
ft_sfnt_os2
);
default_char
=
(
pOS2
->
usDefaultChar
?
get_glyph_index
(
font
,
pOS2
->
usDefaultChar
)
:
0
);
}
else
{
TEXTMETRICW
textm
;
get_text_metrics
(
font
,
&
textm
);
default_char
=
textm
.
tmDefaultChar
;
}
return
default_char
;
}
/*************************************************************
* freetype_GetGlyphIndices
*/
...
...
@@ -5849,17 +5868,7 @@ static DWORD freetype_GetGlyphIndices( PHYSDEV dev, LPCWSTR lpstr, INT count, LP
{
if
(
!
got_default
)
{
if
(
FT_IS_SFNT
(
physdev
->
font
->
ft_face
))
{
TT_OS2
*
pOS2
=
pFT_Get_Sfnt_Table
(
physdev
->
font
->
ft_face
,
ft_sfnt_os2
);
default_char
=
(
pOS2
->
usDefaultChar
?
get_glyph_index
(
physdev
->
font
,
pOS2
->
usDefaultChar
)
:
0
);
}
else
{
TEXTMETRICW
textm
;
get_text_metrics
(
physdev
->
font
,
&
textm
);
default_char
=
textm
.
tmDefaultChar
;
}
default_char
=
get_default_char_index
(
physdev
->
font
);
got_default
=
TRUE
;
}
pgi
[
i
]
=
default_char
;
...
...
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