Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Avalonia.HtmlRenderer/Adapters/FontAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public FontAdapter(Typeface font, double size)
#pragma warning disable CS0618 // Type or member is obsolete
var emHeight = _glyphTypeface.Metrics.DesignEmHeight;
_height = 96d / 72d * (_size / emHeight) * _glyphTypeface.Metrics.LineSpacing;
_underlineOffset = 96d / 72d * (_size / emHeight) * (_glyphTypeface.Metrics.LineSpacing + _glyphTypeface.Metrics.UnderlinePosition);
_underlineOffset = 96d / 72d * (_size / emHeight) * (-_glyphTypeface.Metrics.Ascent + _glyphTypeface.Metrics.UnderlinePosition);

TextRunProperties = new GenericTextRunProperties(font, 96d / 72d * size, null, null, null, BaselineAlignment.Baseline, CultureInfo.CurrentCulture);
TextParagraphProperties = new GenericTextParagraphProperties(TextRunProperties, textWrap: TextWrapping.Wrap);
Expand Down