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
b16f3301
Commit
b16f3301
authored
Jun 12, 2005
by
Krzysztof Foltman
Committed by
Alexandre Julliard
Jun 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added support for \ulnone (turning underline off)
- support for basic subscript and superscript - untested support for text offset
parent
78e95198
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
editor.c
dlls/riched20/editor.c
+15
-0
paint.c
dlls/riched20/paint.c
+11
-1
style.c
dlls/riched20/style.c
+2
-0
No files found.
dlls/riched20/editor.c
View file @
b16f3301
...
...
@@ -321,11 +321,26 @@ void ME_RTFCharAttrHook(RTF_Info *info)
case
rtfUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINE
;
fmt
.
dwEffects
=
info
->
rtfParam
?
fmt
.
dwMask
:
0
;
fmt
.
bUnderlineType
=
CFU_CF1UNDERLINE
;
break
;
case
rtfNoUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINE
;
fmt
.
dwEffects
=
0
;
break
;
case
rtfStrikeThru
:
fmt
.
dwMask
=
CFM_STRIKEOUT
;
fmt
.
dwEffects
=
info
->
rtfParam
?
fmt
.
dwMask
:
0
;
break
;
case
rtfSubScript
:
case
rtfSuperScript
:
case
rtfSubScrShrink
:
case
rtfSuperScrShrink
:
case
rtfNoSuperSub
:
fmt
.
dwMask
=
CFM_SUBSCRIPT
|
CFM_SUPERSCRIPT
;
if
(
info
->
rtfMinor
==
rtfSubScrShrink
)
fmt
.
dwEffects
=
CFE_SUBSCRIPT
;
if
(
info
->
rtfMinor
==
rtfSuperScrShrink
)
fmt
.
dwEffects
=
CFE_SUPERSCRIPT
;
if
(
info
->
rtfMinor
==
rtfNoSuperSub
)
fmt
.
dwEffects
=
0
;
break
;
case
rtfBackColor
:
fmt
.
dwMask
=
CFM_BACKCOLOR
;
fmt
.
dwEffects
=
0
;
...
...
dlls/riched20/paint.c
View file @
b16f3301
...
...
@@ -178,13 +178,23 @@ void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, int nChar
HDC
hDC
=
c
->
hDC
;
HGDIOBJ
hOldFont
;
COLORREF
rgbOld
,
rgbBack
;
int
yOffset
=
0
,
yTwipsOffset
=
0
;
hOldFont
=
ME_SelectStyleFont
(
c
->
editor
,
hDC
,
s
);
rgbBack
=
ME_GetBackColor
(
c
->
editor
);
if
((
s
->
fmt
.
dwMask
&
CFM_COLOR
)
&&
(
s
->
fmt
.
dwEffects
&
CFE_AUTOCOLOR
))
rgbOld
=
SetTextColor
(
hDC
,
GetSysColor
(
COLOR_WINDOWTEXT
));
else
rgbOld
=
SetTextColor
(
hDC
,
s
->
fmt
.
crTextColor
);
ExtTextOutW
(
hDC
,
x
,
y
,
0
,
NULL
,
szText
,
nChars
,
NULL
);
if
((
s
->
fmt
.
dwMask
&
s
->
fmt
.
dwEffects
)
&
CFM_OFFSET
)
{
yTwipsOffset
=
s
->
fmt
.
yOffset
;
}
if
((
s
->
fmt
.
dwMask
&
s
->
fmt
.
dwEffects
)
&
(
CFM_SUPERSCRIPT
|
CFM_SUBSCRIPT
))
{
if
(
s
->
fmt
.
dwEffects
&
CFE_SUPERSCRIPT
)
yTwipsOffset
=
s
->
fmt
.
yHeight
/
3
;
if
(
s
->
fmt
.
dwEffects
&
CFE_SUBSCRIPT
)
yTwipsOffset
=
-
s
->
fmt
.
yHeight
/
12
;
}
if
(
yTwipsOffset
)
yOffset
=
yTwipsOffset
*
GetDeviceCaps
(
hDC
,
LOGPIXELSY
)
/
1440
;
ExtTextOutW
(
hDC
,
x
,
y
-
yOffset
,
0
,
NULL
,
szText
,
nChars
,
NULL
);
if
(
width
)
{
SIZE
sz
;
GetTextExtentPoint32W
(
hDC
,
szText
,
nChars
,
&
sz
);
...
...
dlls/riched20/style.c
View file @
b16f3301
...
...
@@ -268,6 +268,8 @@ void ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, ME_Style *s)
lf
->
lfUnderline
=
1
;
if
(
s
->
fmt
.
dwEffects
&
s
->
fmt
.
dwMask
&
CFM_STRIKEOUT
)
lf
->
lfStrikeOut
=
1
;
if
(
s
->
fmt
.
dwEffects
&
s
->
fmt
.
dwMask
&
(
CFM_SUBSCRIPT
|
CFM_SUPERSCRIPT
))
lf
->
lfHeight
=
(
lf
->
lfHeight
*
2
)
/
3
;
/*lf.lfQuality = PROOF_QUALITY; */
lf
->
lfPitchAndFamily
=
s
->
fmt
.
bPitchAndFamily
;
lf
->
lfCharSet
=
s
->
fmt
.
bCharSet
;
...
...
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