Browse Source
Merge pull request #4998 from Gillibald/fixes/TextDecorationLocation
Fix TextDecoration location calculation
pull/5010/head
Benedikt Stebner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/Avalonia.Visuals/Media/TextDecoration.cs
|
|
|
@ -189,11 +189,11 @@ namespace Avalonia.Media |
|
|
|
break; |
|
|
|
case TextDecorationLocation.Strikethrough: |
|
|
|
origin += new Point(shapedTextCharacters.GlyphRun.BaselineOrigin.X, |
|
|
|
shapedTextCharacters.GlyphRun.BaselineOrigin.Y - fontMetrics.StrikethroughPosition); |
|
|
|
shapedTextCharacters.GlyphRun.BaselineOrigin.Y + fontMetrics.StrikethroughPosition); |
|
|
|
break; |
|
|
|
case TextDecorationLocation.Underline: |
|
|
|
origin += new Point(shapedTextCharacters.GlyphRun.BaselineOrigin.X, |
|
|
|
shapedTextCharacters.GlyphRun.BaselineOrigin.Y - fontMetrics.UnderlinePosition); |
|
|
|
shapedTextCharacters.GlyphRun.BaselineOrigin.Y + fontMetrics.UnderlinePosition); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
|