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
7 changes: 3 additions & 4 deletions Source/HtmlRenderer/Core/Parse/CssParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,10 @@ private static string ParseImageProperty(string propValue)
private string ParseFontFamilyProperty(string propValue)
{
int start = 0;
while (start > -1 && start < propValue.Length)

while (start < propValue.Length)
{
while (char.IsWhiteSpace(propValue[start]) || propValue[start] == ',' || propValue[start] == '\'' || propValue[start] == '"')
while (start < propValue.Length && (char.IsWhiteSpace(propValue[start]) || propValue[start] == ',' || propValue[start] == '\'' || propValue[start] == '"'))
start++;
var end = propValue.IndexOf(',', start);
if (end < 0)
Expand All @@ -639,9 +640,7 @@ private string ParseFontFamilyProperty(string propValue)
var font = propValue.Substring(start, adjEnd - start + 1);

if (_adapter.IsFontExists(font))
{
return font;
}

start = end;
}
Expand Down