mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Limit max size of a single fallback font file for ASS to 20 MB
It used to be limited to 20 MB total previously. We cannot easily limit total size of fonts anymore, so the least we can do is to keep the size of a single font file in check.
This commit is contained in:
parent
792dee44e2
commit
d821ad3562
1 changed files with 1 additions and 0 deletions
|
@ -1304,6 +1304,7 @@ export class HtmlVideoPlayer {
|
|||
const availableFonts = {};
|
||||
fontFiles.forEach(font => {
|
||||
if (!font.FamilyName) return;
|
||||
if (font.Size > 20 * 1024 * 1024) return; // max 20 MB for any single font file
|
||||
const familyNameLower = font.FamilyName.trim().toLowerCase();
|
||||
if (!(familyNameLower in availableFonts)) {
|
||||
const fontUrl = apiClient.getUrl(`/FallbackFont/Fonts/${encodeURIComponent(font.Name)}`, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue