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
2cd9ee95
Commit
2cd9ee95
authored
Feb 12, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Feb 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetCharABCWidths returns the widths of unrotated glyphs like
GetCharWidth already does.
parent
780667fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
9 deletions
+49
-9
freetype.c
dlls/gdi/freetype.c
+32
-0
gdi_private.h
dlls/gdi/gdi_private.h
+2
-0
font.c
objects/font.c
+15
-9
No files found.
dlls/gdi/freetype.c
View file @
2cd9ee95
...
...
@@ -2377,6 +2377,31 @@ BOOL WineEngGetCharWidth(GdiFont font, UINT firstChar, UINT lastChar,
}
/*************************************************************
* WineEngGetCharABCWidths
*
*/
BOOL
WineEngGetCharABCWidths
(
GdiFont
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
{
UINT
c
;
GLYPHMETRICS
gm
;
FT_UInt
glyph_index
;
TRACE
(
"%p, %d, %d, %p
\n
"
,
font
,
firstChar
,
lastChar
,
buffer
);
for
(
c
=
firstChar
;
c
<=
lastChar
;
c
++
)
{
glyph_index
=
get_glyph_index
(
font
,
c
);
WineEngGetGlyphOutline
(
font
,
glyph_index
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
NULL
);
buffer
[
c
-
firstChar
].
abcA
=
font
->
gm
[
glyph_index
].
lsb
;
buffer
[
c
-
firstChar
].
abcB
=
font
->
gm
[
glyph_index
].
bbx
;
buffer
[
c
-
firstChar
].
abcC
=
font
->
gm
[
glyph_index
].
adv
-
font
->
gm
[
glyph_index
].
lsb
-
font
->
gm
[
glyph_index
].
bbx
;
}
return
TRUE
;
}
/*************************************************************
* WineEngGetTextExtentPoint
*
*/
...
...
@@ -2557,6 +2582,13 @@ BOOL WineEngGetCharWidth(GdiFont font, UINT firstChar, UINT lastChar,
return
FALSE
;
}
BOOL
WineEngGetCharABCWidths
(
GdiFont
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
FALSE
;
}
BOOL
WineEngGetTextExtentPoint
(
GdiFont
font
,
LPCWSTR
wstr
,
INT
count
,
LPSIZE
size
)
{
...
...
dlls/gdi/gdi_private.h
View file @
2cd9ee95
...
...
@@ -218,6 +218,8 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID);
extern
GdiFont
WineEngCreateFontInstance
(
DC
*
,
HFONT
);
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
FONTENUMPROCW
,
LPARAM
);
extern
BOOL
WineEngGetCharABCWidths
(
GdiFont
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
);
extern
BOOL
WineEngGetCharWidth
(
GdiFont
,
UINT
,
UINT
,
LPINT
);
extern
DWORD
WineEngGetFontData
(
GdiFont
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
);
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
font
,
LPCWSTR
lpstr
,
INT
count
,
...
...
objects/font.c
View file @
2cd9ee95
...
...
@@ -1668,19 +1668,25 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
LPABC
abc
)
{
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
int
i
;
GLYPHMETRICS
gm
;
int
i
;
BOOL
ret
=
FALSE
;
if
(
dc
->
gdiFont
)
{
for
(
i
=
firstChar
;
i
<=
lastChar
;
i
++
)
{
GetGlyphOutlineW
(
hdc
,
i
,
GGO_METRICS
,
&
gm
,
0
,
NULL
,
NULL
);
abc
[
i
-
firstChar
].
abcA
=
gm
.
gmptGlyphOrigin
.
x
;
abc
[
i
-
firstChar
].
abcB
=
gm
.
gmBlackBoxX
;
abc
[
i
-
firstChar
].
abcC
=
gm
.
gmCellIncX
-
gm
.
gmptGlyphOrigin
.
x
-
gm
.
gmBlackBoxX
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharABCWidths
(
dc
->
gdiFont
,
firstChar
,
lastChar
,
abc
);
else
FIXME
(
": stub
\n
"
);
if
(
ret
)
{
/* convert device units to logical */
for
(
i
=
firstChar
;
i
<=
lastChar
;
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
;
ret
=
TRUE
;
}
GDI_ReleaseObj
(
hdc
);
return
ret
;
}
...
...
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