diff options
Diffstat (limited to 'src/fontpack.c')
-rw-r--r-- | src/fontpack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fontpack.c b/src/fontpack.c index ec62702f..40e4c96c 100644 --- a/src/fontpack.c +++ b/src/fontpack.c | |||
@@ -389,6 +389,7 @@ void handleIniKeyValue_FontPack_(void *context, const iString *table, const iStr | |||
389 | } | 389 | } |
390 | } | 390 | } |
391 | iString *fontFileId = concat_Path(d->loadPath, cleanPath); | 391 | iString *fontFileId = concat_Path(d->loadPath, cleanPath); |
392 | iAssert(!isEmpty_String(fontFileId)); | ||
392 | /* FontFiles share source data blocks. The entire FontFiles can be reused, too, | 393 | /* FontFiles share source data blocks. The entire FontFiles can be reused, too, |
393 | if have the same collection index is in use. */ | 394 | if have the same collection index is in use. */ |
394 | iBlock *data = NULL; | 395 | iBlock *data = NULL; |
@@ -466,6 +467,7 @@ iBool loadArchive_FontPack(iFontPack *d, const iArchive *zip) { | |||
466 | } | 467 | } |
467 | 468 | ||
468 | void setLoadPath_FontPack(iFontPack *d, const iString *path) { | 469 | void setLoadPath_FontPack(iFontPack *d, const iString *path) { |
470 | /* Note: `path` is for the local file system. */ | ||
469 | if (!d->loadPath) { | 471 | if (!d->loadPath) { |
470 | d->loadPath = new_String(); | 472 | d->loadPath = new_String(); |
471 | } | 473 | } |
@@ -480,7 +482,8 @@ const iString *idFromUrl_FontPack(const iString *url) { | |||
480 | iString *id = new_String(); | 482 | iString *id = new_String(); |
481 | iUrl parts; | 483 | iUrl parts; |
482 | init_Url(&parts, url); | 484 | init_Url(&parts, url); |
483 | setRange_String(id, baseName_Path(collectNewRange_String(parts.path))); | 485 | /* URLs always use slash as separator. */ |
486 | setRange_String(id, baseNameSep_Path(collectNewRange_String(parts.path), "/")); | ||
484 | setRange_String(id, withoutExtension_Path(id)); | 487 | setRange_String(id, withoutExtension_Path(id)); |
485 | replace_String(id, " ", "-"); | 488 | replace_String(id, " ", "-"); |
486 | return collect_String(id); | 489 | return collect_String(id); |