Skip to content

Commit 1d0c16e

Browse files
authored
Merge pull request #1129 from Bykiev/FixSixLaborsFont
Specify the Culture while searching the font
2 parents b91b047 + 2004c1f commit 1d0c16e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main/SS/Util/SheetUtil.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace NPOI.SS.Util
2323
using System.Collections.Generic;
2424
using SixLabors.Fonts;
2525
using System.Linq;
26+
using System.Globalization;
2627

2728
/**
2829
* Helper methods for when working with Usermodel sheets
@@ -717,9 +718,9 @@ internal static Font IFont2Font(IFont font1)
717718
// use "Arial". TODO-Fonts: More fallbacks.
718719
SixLabors.Fonts.FontFamily fontFamily;
719720

720-
if (false == SystemFonts.TryGet(font1.FontName, out fontFamily))
721+
if (false == SystemFonts.TryGet(font1.FontName, CultureInfo.CurrentCulture, out fontFamily))
721722
{
722-
if (false == SystemFonts.TryGet("Arial", out fontFamily))
723+
if (false == SystemFonts.TryGet("Arial", CultureInfo.CurrentCulture, out fontFamily))
723724
{
724725
fontFamily = SystemFonts.Families.First();
725726
}

0 commit comments

Comments
 (0)