Skip to content
Merged
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
17 changes: 3 additions & 14 deletions src/Magick.NET/Settings/MagickSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public string? Font
/// </summary>
public string? FontFamily
{
get => GetOption("family");
get => Drawing.FontFamily;
set
{
SetOptionAndArtifact("family", value);
Expand All @@ -191,7 +191,7 @@ public double FontPointsize
/// </summary>
public FontStyleType FontStyle
{
get => EnumHelper.Parse(GetOption("style"), FontStyleType.Undefined);
get => Drawing.FontStyle;
set
{
SetOptionAndArtifact("style", value);
Expand All @@ -204,18 +204,7 @@ public FontStyleType FontStyle
/// </summary>
public FontWeight FontWeight
{
get
{
var weight = GetOption("weight");
if (string.IsNullOrEmpty(weight))
return FontWeight.Undefined;

if (!int.TryParse(weight, NumberStyles.Number, CultureInfo.InvariantCulture, out var fontweight))
return FontWeight.Undefined;

return EnumHelper.Parse(fontweight, FontWeight.Undefined);
}

get => Drawing.FontWeight;
set
{
SetOptionAndArtifact("weight", ((int)value).ToString(CultureInfo.InvariantCulture));
Expand Down