Browse Source
Merge pull request #4517 from VisualMelon/Issue3825
Fix Issue3825
pull/4532/head
danwalmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
4 deletions
-
src/Avalonia.Visuals/Media/GlyphRun.cs
-
src/Avalonia.Visuals/Rendering/SceneGraph/GlyphRunNode.cs
|
|
|
@ -555,7 +555,7 @@ namespace Avalonia.Media |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new Rect(0, 0, width, height); |
|
|
|
return new Rect(0, GlyphTypeface.Ascent * Scale, width, height); |
|
|
|
} |
|
|
|
|
|
|
|
private void Set<T>(ref T field, T value) |
|
|
|
@ -595,8 +595,6 @@ namespace Avalonia.Media |
|
|
|
_glyphRunImpl = platformRenderInterface.CreateGlyphRun(this, out var width); |
|
|
|
|
|
|
|
var height = (GlyphTypeface.Descent - GlyphTypeface.Ascent + GlyphTypeface.LineGap) * Scale; |
|
|
|
|
|
|
|
_bounds = new Rect(0, 0, width, height); |
|
|
|
} |
|
|
|
|
|
|
|
void IDisposable.Dispose() |
|
|
|
|
|
|
|
@ -25,7 +25,7 @@ namespace Avalonia.Rendering.SceneGraph |
|
|
|
GlyphRun glyphRun, |
|
|
|
Point baselineOrigin, |
|
|
|
IDictionary<IVisual, Scene> childScenes = null) |
|
|
|
: base(glyphRun.Bounds, transform) |
|
|
|
: base(glyphRun.Bounds.Translate(baselineOrigin), transform) |
|
|
|
{ |
|
|
|
Transform = transform; |
|
|
|
Foreground = foreground?.ToImmutable(); |
|
|
|
|