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
07767bfd
Commit
07767bfd
authored
Apr 19, 2006
by
Jeff Latimer
Committed by
Alexandre Julliard
Apr 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Added implementation of GetCharABCWidthsI.
parent
17de8290
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
1 deletion
+91
-1
font.c
dlls/gdi/font.c
+49
-0
freetype.c
dlls/gdi/freetype.c
+38
-0
gdi32.spec
dlls/gdi/gdi32.spec
+1
-1
gdi_private.h
dlls/gdi/gdi_private.h
+2
-0
wingdi.h
include/wingdi.h
+1
-0
No files found.
dlls/gdi/font.c
View file @
07767bfd
...
@@ -2358,6 +2358,55 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
...
@@ -2358,6 +2358,55 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
}
}
/******************************************************************************
* GetCharABCWidthsI [GDI32.@]
*
* Retrieves widths of characters in range.
*
* PARAMS
* hdc [I] Handle of device context
* firstChar [I] First glyphs in range to query
* count [I] Last glyphs in range to query
* pgi [i] Array of glyphs to query
* abc [O] Address of character-width structure
*
* NOTES
* Only works with TrueType fonts
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
GetCharABCWidthsI
(
HDC
hdc
,
UINT
firstChar
,
UINT
count
,
LPWORD
pgi
,
LPABC
abc
)
{
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
unsigned
int
i
;
BOOL
ret
=
FALSE
;
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharABCWidthsI
(
dc
->
gdiFont
,
firstChar
,
count
,
pgi
,
abc
);
else
FIXME
(
": stub
\n
"
);
if
(
ret
)
{
/* convert device units to logical */
for
(
i
=
firstChar
;
i
<=
count
;
i
++
,
abc
++
)
{
abc
->
abcA
=
INTERNAL_XDSTOWS
(
dc
,
abc
->
abcA
);
abc
->
abcB
=
INTERNAL_XDSTOWS
(
dc
,
abc
->
abcB
);
abc
->
abcC
=
INTERNAL_XDSTOWS
(
dc
,
abc
->
abcC
);
}
ret
=
TRUE
;
}
GDI_ReleaseObj
(
hdc
);
return
ret
;
}
/***********************************************************************
/***********************************************************************
* GetGlyphOutlineA (GDI32.@)
* GetGlyphOutlineA (GDI32.@)
*/
*/
...
...
dlls/gdi/freetype.c
View file @
07767bfd
...
@@ -3809,6 +3809,44 @@ BOOL WineEngGetCharABCWidths(GdiFont font, UINT firstChar, UINT lastChar,
...
@@ -3809,6 +3809,44 @@ BOOL WineEngGetCharABCWidths(GdiFont font, UINT firstChar, UINT lastChar,
}
}
/*************************************************************
/*************************************************************
* WineEngGetCharABCWidthsI
*
*/
BOOL
WineEngGetCharABCWidthsI
(
GdiFont
font
,
UINT
firstChar
,
UINT
count
,
LPWORD
pgi
,
LPABC
buffer
)
{
UINT
c
;
GLYPHMETRICS
gm
;
FT_UInt
glyph_index
;
GdiFont
linked_font
;
if
(
!
FT_IS_SCALABLE
(
font
->
ft_face
))
return
FALSE
;
get_glyph_index_linked
(
font
,
'a'
,
&
linked_font
,
&
glyph_index
);
if
(
!
pgi
)
for
(
c
=
firstChar
;
c
<
firstChar
+
count
;
c
++
)
{
WineEngGetGlyphOutline
(
linked_font
,
c
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
NULL
);
buffer
[
c
-
firstChar
].
abcA
=
linked_font
->
gm
[
c
].
lsb
;
buffer
[
c
-
firstChar
].
abcB
=
linked_font
->
gm
[
c
].
bbx
;
buffer
[
c
-
firstChar
].
abcC
=
linked_font
->
gm
[
c
].
adv
-
linked_font
->
gm
[
c
].
lsb
-
linked_font
->
gm
[
c
].
bbx
;
}
else
for
(
c
=
0
;
c
<
count
;
c
++
)
{
WineEngGetGlyphOutline
(
linked_font
,
pgi
[
c
],
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
NULL
);
buffer
[
c
].
abcA
=
linked_font
->
gm
[
pgi
[
c
]].
lsb
;
buffer
[
c
].
abcB
=
linked_font
->
gm
[
pgi
[
c
]].
bbx
;
buffer
[
c
].
abcC
=
linked_font
->
gm
[
pgi
[
c
]].
adv
-
linked_font
->
gm
[
pgi
[
c
]].
lsb
-
linked_font
->
gm
[
pgi
[
c
]].
bbx
;
}
return
TRUE
;
}
/*************************************************************
* WineEngGetTextExtentPoint
* WineEngGetTextExtentPoint
*
*
*/
*/
...
...
dlls/gdi/gdi32.spec
View file @
07767bfd
...
@@ -237,7 +237,7 @@
...
@@ -237,7 +237,7 @@
@ stdcall GetCharABCWidthsA(long long long ptr)
@ stdcall GetCharABCWidthsA(long long long ptr)
@ stdcall GetCharABCWidthsFloatA(long long long ptr)
@ stdcall GetCharABCWidthsFloatA(long long long ptr)
@ stdcall GetCharABCWidthsFloatW(long long long ptr)
@ stdcall GetCharABCWidthsFloatW(long long long ptr)
# @ stub GetCharABCWidthsI
@ stdcall GetCharABCWidthsI(long long long ptr ptr)
@ stdcall GetCharABCWidthsW(long long long ptr)
@ stdcall GetCharABCWidthsW(long long long ptr)
@ stdcall GetCharWidth32A(long long long long)
@ stdcall GetCharWidth32A(long long long long)
@ stdcall GetCharWidth32W(long long long long)
@ stdcall GetCharWidth32W(long long long long)
...
...
dlls/gdi/gdi_private.h
View file @
07767bfd
...
@@ -367,6 +367,8 @@ extern BOOL WineEngDestroyFontInstance(HFONT handle);
...
@@ -367,6 +367,8 @@ extern BOOL WineEngDestroyFontInstance(HFONT handle);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
FONTENUMPROCW
,
LPARAM
);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
FONTENUMPROCW
,
LPARAM
);
extern
BOOL
WineEngGetCharABCWidths
(
GdiFont
font
,
UINT
firstChar
,
extern
BOOL
WineEngGetCharABCWidths
(
GdiFont
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
);
UINT
lastChar
,
LPABC
buffer
);
extern
BOOL
WineEngGetCharABCWidthsI
(
GdiFont
font
,
UINT
firstChar
,
UINT
count
,
LPWORD
pgi
,
LPABC
buffer
);
extern
BOOL
WineEngGetCharWidth
(
GdiFont
,
UINT
,
UINT
,
LPINT
);
extern
BOOL
WineEngGetCharWidth
(
GdiFont
,
UINT
,
UINT
,
LPINT
);
extern
DWORD
WineEngGetFontData
(
GdiFont
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
);
extern
DWORD
WineEngGetFontData
(
GdiFont
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
);
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
font
,
LPCWSTR
lpstr
,
INT
count
,
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
font
,
LPCWSTR
lpstr
,
INT
count
,
...
...
include/wingdi.h
View file @
07767bfd
...
@@ -3394,6 +3394,7 @@ BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
...
@@ -3394,6 +3394,7 @@ BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
,
UINT
,
UINT
,
LPABCFLOAT
);
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
,
UINT
,
UINT
,
LPABCFLOAT
);
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
,
UINT
,
UINT
,
LPABCFLOAT
);
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
,
UINT
,
UINT
,
LPABCFLOAT
);
#define GetCharABCWidthsFloat WINELIB_NAME_AW(GetCharABCWidthsFloat)
#define GetCharABCWidthsFloat WINELIB_NAME_AW(GetCharABCWidthsFloat)
BOOL
WINAPI
GetCharABCWidthsI
(
HDC
,
UINT
,
UINT
,
LPWORD
,
LPABC
);
DWORD
WINAPI
GetCharacterPlacementA
(
HDC
,
LPCSTR
,
INT
,
INT
,
GCP_RESULTSA
*
,
DWORD
);
DWORD
WINAPI
GetCharacterPlacementA
(
HDC
,
LPCSTR
,
INT
,
INT
,
GCP_RESULTSA
*
,
DWORD
);
DWORD
WINAPI
GetCharacterPlacementW
(
HDC
,
LPCWSTR
,
INT
,
INT
,
GCP_RESULTSW
*
,
DWORD
);
DWORD
WINAPI
GetCharacterPlacementW
(
HDC
,
LPCWSTR
,
INT
,
INT
,
GCP_RESULTSW
*
,
DWORD
);
#define GetCharacterPlacement WINELIB_NAME_AW(GetCharacterPlacement)
#define GetCharacterPlacement WINELIB_NAME_AW(GetCharacterPlacement)
...
...
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