Skip to content

Commit b3d7b3a

Browse files
authored
RegisterDocumentFont: handle %-encoded urls (#625)
Handle '@font-face {src: url("../Fonts/%2A%2A%3..."}' in publishers' stylesheets.
1 parent 4cc75a6 commit b3d7b3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crengine/src/lvfntman.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6192,6 +6192,8 @@ class LVFreeTypeFontManager : public LVFontManager
61926192
}
61936193
name.trim(); // Remove any " " appended to avoid url override with duplicates
61946194
LVStreamRef stream = container->OpenStream(name.c_str(), LVOM_READ);
6195+
if (stream.isNull()) // Try again in case it is percent-encoded
6196+
stream = container->OpenStream(DecodeHTMLUrlString(name).c_str(), LVOM_READ);
61956197
if (stream.isNull())
61966198
return false;
61976199
lUInt32 size = (lUInt32)stream->GetSize();

0 commit comments

Comments
 (0)