Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
885a4a5c
Commit
885a4a5c
authored
13 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
gdi32: Add an initial Freetype font driver.
parent
6bb001da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/gdi32/freetype.c
+163
-0
163 additions, 0 deletions
dlls/gdi32/freetype.c
with
163 additions
and
0 deletions
dlls/gdi32/freetype.c
+
163
−
0
View file @
885a4a5c
...
...
@@ -375,6 +375,18 @@ static struct list font_subst_list = LIST_INIT(font_subst_list);
static
struct
list
font_list
=
LIST_INIT
(
font_list
);
struct
freetype_physdev
{
struct
gdi_physdev
dev
;
};
static
inline
struct
freetype_physdev
*
get_freetype_dev
(
PHYSDEV
dev
)
{
return
(
struct
freetype_physdev
*
)
dev
;
}
static
const
struct
gdi_dc_funcs
freetype_funcs
;
static
const
WCHAR
defSerif
[]
=
{
'T'
,
'i'
,
'm'
,
'e'
,
's'
,
' '
,
'N'
,
'e'
,
'w'
,
' '
,
'R'
,
'o'
,
'm'
,
'a'
,
'n'
,
'\0'
};
static
const
WCHAR
defSans
[]
=
{
'A'
,
'r'
,
'i'
,
'a'
,
'l'
,
'\0'
};
static
const
WCHAR
defFixed
[]
=
{
'C'
,
'o'
,
'u'
,
'r'
,
'i'
,
'e'
,
'r'
,
' '
,
'N'
,
'e'
,
'w'
,
'\0'
};
...
...
@@ -2973,6 +2985,7 @@ static BOOL init_freetype(void)
((
FT_Version
.
minor
<<
8
)
&
0x00ff00
)
|
((
FT_Version
.
patch
)
&
0x0000ff
);
font_driver
=
&
freetype_funcs
;
return
TRUE
;
sym_not_found:
...
...
@@ -3773,6 +3786,32 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
return
pFT_Select_Charmap
(
ft_face
,
encoding
)
==
FT_Err_Ok
;
}
/*************************************************************
* freetype_CreateDC
*/
static
BOOL
freetype_CreateDC
(
PHYSDEV
*
dev
,
LPCWSTR
driver
,
LPCWSTR
device
,
LPCWSTR
output
,
const
DEVMODEW
*
devmode
)
{
struct
freetype_physdev
*
physdev
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
physdev
)
);
if
(
!
physdev
)
return
FALSE
;
push_dc_driver
(
dev
,
&
physdev
->
dev
,
&
freetype_funcs
);
return
TRUE
;
}
/*************************************************************
* freetype_DeleteDC
*/
static
BOOL
freetype_DeleteDC
(
PHYSDEV
dev
)
{
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
return
TRUE
;
}
/*************************************************************
* WineEngCreateFontInstance
*
...
...
@@ -6978,6 +7017,130 @@ DWORD WineEngGetKerningPairs(GdiFont *font, DWORD cPairs, KERNINGPAIR *kern_pair
return
font
->
total_kern_pairs
;
}
static
const
struct
gdi_dc_funcs
freetype_funcs
=
{
NULL
,
/* pAbortDoc */
NULL
,
/* pAbortPath */
NULL
,
/* pAlphaBlend */
NULL
,
/* pAngleArc */
NULL
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
NULL
,
/* pChord */
NULL
,
/* pCloseFigure */
NULL
,
/* pCreateBitmap */
NULL
,
/* pCreateCompatibleDC */
freetype_CreateDC
,
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pDeleteBitmap */
freetype_DeleteDC
,
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
NULL
,
/* pDeviceCapabilities */
NULL
,
/* pEllipse */
NULL
,
/* pEndDoc */
NULL
,
/* pEndPage */
NULL
,
/* pEndPath */
NULL
,
/* pEnumDeviceFonts */
NULL
,
/* pEnumICMProfiles */
NULL
,
/* pExcludeClipRect */
NULL
,
/* pExtDeviceMode */
NULL
,
/* pExtEscape */
NULL
,
/* pExtFloodFill */
NULL
,
/* pExtSelectClipRgn */
NULL
,
/* pExtTextOut */
NULL
,
/* pFillPath */
NULL
,
/* pFillRgn */
NULL
,
/* pFlattenPath */
NULL
,
/* pFrameRgn */
NULL
,
/* pGdiComment */
NULL
,
/* pGetCharWidth */
NULL
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetImage */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetPixel */
NULL
,
/* pGetPixelFormat */
NULL
,
/* pGetSystemPaletteEntries */
NULL
,
/* pGetTextExtentExPoint */
NULL
,
/* pGetTextMetrics */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
NULL
,
/* pLineTo */
NULL
,
/* pModifyWorldTransform */
NULL
,
/* pMoveTo */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg */
NULL
,
/* pOffsetWindowOrg */
NULL
,
/* pPaintRgn */
NULL
,
/* pPatBlt */
NULL
,
/* pPie */
NULL
,
/* pPolyBezier */
NULL
,
/* pPolyBezierTo */
NULL
,
/* pPolyDraw */
NULL
,
/* pPolyPolygon */
NULL
,
/* pPolyPolyline */
NULL
,
/* pPolygon */
NULL
,
/* pPolyline */
NULL
,
/* pPolylineTo */
NULL
,
/* pPutImage */
NULL
,
/* pRealizeDefaultPalette */
NULL
,
/* pRealizePalette */
NULL
,
/* pRectangle */
NULL
,
/* pResetDC */
NULL
,
/* pRestoreDC */
NULL
,
/* pRoundRect */
NULL
,
/* pSaveDC */
NULL
,
/* pScaleViewportExt */
NULL
,
/* pScaleWindowExt */
NULL
,
/* pSelectBitmap */
NULL
,
/* pSelectBrush */
NULL
,
/* pSelectClipPath */
NULL
,
/* pSelectFont */
NULL
,
/* pSelectPalette */
NULL
,
/* pSelectPen */
NULL
,
/* pSetArcDirection */
NULL
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetDCBrushColor */
NULL
,
/* pSetDCPenColor */
NULL
,
/* pSetDIBColorTable */
NULL
,
/* pSetDIBitsToDevice */
NULL
,
/* pSetDeviceClipping */
NULL
,
/* pSetDeviceGammaRamp */
NULL
,
/* pSetLayout */
NULL
,
/* pSetMapMode */
NULL
,
/* pSetMapperFlags */
NULL
,
/* pSetPixel */
NULL
,
/* pSetPixelFormat */
NULL
,
/* pSetPolyFillMode */
NULL
,
/* pSetROP2 */
NULL
,
/* pSetRelAbs */
NULL
,
/* pSetStretchBltMode */
NULL
,
/* pSetTextAlign */
NULL
,
/* pSetTextCharacterExtra */
NULL
,
/* pSetTextColor */
NULL
,
/* pSetTextJustification */
NULL
,
/* pSetViewportExt */
NULL
,
/* pSetViewportOrg */
NULL
,
/* pSetWindowExt */
NULL
,
/* pSetWindowOrg */
NULL
,
/* pSetWorldTransform */
NULL
,
/* pStartDoc */
NULL
,
/* pStartPage */
NULL
,
/* pStretchBlt */
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
/* OpenGL not supported */
};
#else
/* HAVE_FREETYPE */
/*************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment