Skip to content

Commit b5807b2

Browse files
committed
font-family is always lowercase in HtmlRenderer, but returned with correct casing from PdfSharpCore.
1 parent 5fcc890 commit b5807b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Source/HtmlRenderer/Core/Handlers/FontsHandler.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ public bool IsFontExists(string family)
9494

9595
// PdfSharpCore will return the first font it knows about if it can't
9696
// find the font you requested, so let's check we actually got what
97-
// we asked for:
98-
if (font.Family != family)
97+
// we asked for (CSS font-family is case-insensitive, luckily so is
98+
// PdfSharpCore):
99+
if (string.Compare(font.Family, family, StringComparison.InvariantCultureIgnoreCase) != 0)
99100
{
100101
return false;
101102
}

0 commit comments

Comments
 (0)