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
4e2024e8
Commit
4e2024e8
authored
Oct 23, 2001
by
Huw D M Davies
Committed by
Alexandre Julliard
Oct 23, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GetFontData.
parent
2843934a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
8 deletions
+64
-8
configure
configure
+0
-0
configure.in
configure.in
+2
-1
freetype.c
dlls/gdi/freetype.c
+47
-0
config.h.in
include/config.h.in
+4
-1
font.h
include/font.h
+1
-0
font.c
objects/font.c
+10
-6
No files found.
configure
View file @
4e2024e8
This diff is collapsed.
Click to expand it.
configure.in
View file @
4e2024e8
...
...
@@ -414,7 +414,8 @@ else
freetype/ftnames.h \
freetype/ftsnames.h \
freetype/ttnameid.h \
freetype/ftoutln.h)
freetype/ftoutln.h \
freetype/internal/sfnt.h)
CPPFLAGS="$ac_save_CPPFLAGS"
wine_cv_msg_freetype=no
fi
...
...
dlls/gdi/freetype.c
View file @
4e2024e8
...
...
@@ -21,6 +21,7 @@
#include <string.h>
#include <dirent.h>
#include <stdio.h>
#include <assert.h>
DEFAULT_DEBUG_CHANNEL
(
font
);
...
...
@@ -47,6 +48,9 @@ DEFAULT_DEBUG_CHANNEL(font);
#ifdef HAVE_FREETYPE_FTOUTLN_H
#include <freetype/ftoutln.h>
#endif
#ifdef HAVE_FREETYPE_INTERNAL_SFNT_H
#include <freetype/internal/sfnt.h>
#endif
static
FT_Library
library
=
0
;
...
...
@@ -770,6 +774,43 @@ BOOL WineEngGetTextExtentPoint(GdiFont font, LPCWSTR wstr, INT count,
return
TRUE
;
}
/*************************************************************
* WineEngGetFontData
*
*/
DWORD
WineEngGetFontData
(
GdiFont
font
,
DWORD
table
,
DWORD
offset
,
LPVOID
buf
,
DWORD
cbData
)
{
FT_Face
ft_face
=
font
->
ft_face
;
TT_Face
tt_face
;
SFNT_Interface
*
sfnt
;
DWORD
len
;
FT_Error
err
;
if
(
!
FT_IS_SFNT
(
ft_face
))
return
GDI_ERROR
;
tt_face
=
(
TT_Face
)
ft_face
;
sfnt
=
(
SFNT_Interface
*
)
tt_face
->
sfnt
;
if
(
!
buf
||
!
cbData
)
len
=
0
;
else
len
=
cbData
;
if
(
table
)
{
/* MS tags differ in endidness from FT ones */
table
=
table
>>
24
|
table
<<
24
|
(
table
>>
8
&
0xff00
)
|
(
table
<<
8
&
0xff0000
);
}
err
=
sfnt
->
load_any
(
tt_face
,
table
,
offset
,
buf
,
&
len
);
if
(
err
)
{
ERR
(
"Can't find table %08lx
\n
"
,
table
);
return
GDI_ERROR
;
}
return
len
;
}
#else
/* HAVE_FREETYPE */
BOOL
WineEngInit
(
void
)
...
...
@@ -831,5 +872,11 @@ BOOL WineEngGetTextExtentPoint(GdiFont font, LPCWSTR wstr, INT count,
return
FALSE
;
}
DWORD
WineEngGetFontData
(
GdiFont
font
,
DWORD
table
,
DWORD
offset
,
LPVOID
buf
,
DWORD
cbData
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
GDI_ERROR
;
}
#endif
/* HAVE_FREETYPE */
include/config.h.in
View file @
4e2024e8
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
/* include/config.h.in. Generated automatically from configure.in by autoheader
2.13
. */
/* Define if using alloca.c. */
#undef C_ALLOCA
...
...
@@ -238,6 +238,9 @@
/* Define if you have the <freetype/ftsnames.h> header file. */
#undef HAVE_FREETYPE_FTSNAMES_H
/* Define if you have the <freetype/internal/sfnt.h> header file. */
#undef HAVE_FREETYPE_INTERNAL_SFNT_H
/* Define if you have the <freetype/ttnameid.h> header file. */
#undef HAVE_FREETYPE_TTNAMEID_H
...
...
include/font.h
View file @
4e2024e8
...
...
@@ -78,6 +78,7 @@ extern GdiFont WineEngCreateFontInstance(HFONT);
extern
DWORD
WineEngDecRefFont
(
GdiFont
);
extern
DWORD
WineEngEnumFonts
(
LPLOGFONTW
,
DEVICEFONTENUMPROC
,
LPARAM
);
extern
BOOL
WineEngGetCharWidth
(
GdiFont
,
UINT
,
UINT
,
LPINT
);
extern
DWORD
WineEngGetFontData
(
GdiFont
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
);
extern
DWORD
WineEngGetGlyphOutline
(
GdiFont
,
UINT
glyph
,
UINT
format
,
LPGLYPHMETRICS
,
DWORD
buflen
,
LPVOID
buf
,
const
MAT2
*
);
...
...
objects/font.c
View file @
4e2024e8
...
...
@@ -1895,16 +1895,20 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
*
* Calls SetLastError()
*
* BUGS
*
* Unimplemented
*/
DWORD
WINAPI
GetFontData
(
HDC
hdc
,
DWORD
table
,
DWORD
offset
,
LPVOID
buffer
,
DWORD
length
)
{
FIXME
(
"(%x,%ld,%ld,%p,%ld): stub
\n
"
,
hdc
,
table
,
offset
,
buffer
,
length
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
GDI_ERROR
;
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
DWORD
ret
=
GDI_ERROR
;
if
(
!
dc
)
return
GDI_ERROR
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetFontData
(
dc
->
gdiFont
,
table
,
offset
,
buffer
,
length
);
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