|
|
@@ -149,6 +149,7 @@ namespace QuestPDF.Drawing
|
|
|
TextSize = (style.Size ?? 12) * GetTextScale(style),
|
|
|
IsAntialias = true,
|
|
|
TextSkewX = GetTextSkew(style, targetTypeface),
|
|
|
+ FakeBoldText = UseFakeBoldText(style, targetTypeface)
|
|
|
};
|
|
|
}
|
|
|
|
|
|
@@ -205,6 +206,12 @@ namespace QuestPDF.Drawing
|
|
|
|
|
|
return useObliqueText ? -0.25f : 0;
|
|
|
}
|
|
|
+
|
|
|
+ static bool UseFakeBoldText(TextStyle originalTextStyle, SKTypeface targetTypeface)
|
|
|
+ {
|
|
|
+ // requested bold text but got typeface that is not bold
|
|
|
+ return originalTextStyle.FontWeight > FontWeight.Medium && !targetTypeface.IsBold;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
internal static SKFontMetrics ToFontMetrics(this TextStyle style)
|