w3c / IFT

W3C Incremental Font Transfer
Other
21 stars 11 forks source link

Add text for the "Load a Patch File" algorithm. #162

Closed garretrieger closed 5 months ago

garretrieger commented 5 months ago

This defines patch URI's as URI references which may be relative. Relative references use the containing incremental font URI as the base URI.


Preview | Diff

garretrieger commented 5 months ago

On the protocol restrictions subject: Is there any reason to have restrictions on the patches that aren't on the initial font file? I can't think of any offhand. And since the URIs would be relative it seems like that reasoning would take care of the problem.

I'm currently specifying the use of URI References for the patches. These can be absolute or relative. So as things currently are if we do decide to introduce protocol restrictions we would need to do so for both the initial font file and the patches.

I can envision some cases where you might have a different protocol (scheme in the URI spec) on the patches than the init file. For example, you could theoretically embed the initial font file as a data URI in the CSS while having the patches loaded with absolute URI's to remove a round trip (assuming your init file is fairly small).

garretrieger commented 5 months ago

On the protocol restrictions subject: Is there any reason to have restrictions on the patches that aren't on the initial font file? I can't think of any offhand. And since the URIs would be relative it seems like that reasoning would take care of the problem.

I'm currently specifying the use of URI References for the patches. These can be absolute or relative. So as things currently are if we do decide to introduce protocol restrictions we would need to do so for both the initial font file and the patches.

I can envision some cases where you might have a different protocol (scheme in the URI spec) on the patches than the init file. For example, you could theoretically embed the initial font file as a data URI in the CSS while having the patches loaded with absolute URI's to remove a round trip (assuming your init file is fairly small).

As for the restrictions, agreed that'd we'd likely want the same restrictions in place for both init font and patches, but just make sure to do it in a way that allows the two to have different protocols.