I'd like some clarification on how fonts should be handled if the @font-face block that describes them is modified after the document has loaded.
Using any of the methods below, my expectation (which could be wrong) is that the browser should stop rendering text using a custom font:
- Invalidating the
@font-face rule by renaming it to something like @-disabled-font-face
- Changing the
font-family value in a @font-face rule but not updating the font-family elsewhere
- Changing the
src value in a @font-face rule
- Disabling a stylesheet containing an
@font-face rule
- Deleting a stylesheet containing an
@font-face rule
However, Safari, Chrome and Firefox all continue to render text using the font. Is this the expected behaviour? If so, could somebody point me to the part of the spec that defines it?
I'd like some clarification on how fonts should be handled if the
@font-faceblock that describes them is modified after the document has loaded.Using any of the methods below, my expectation (which could be wrong) is that the browser should stop rendering text using a custom font:
@font-facerule by renaming it to something like@-disabled-font-facefont-familyvalue in a@font-facerule but not updating thefont-familyelsewheresrcvalue in a@font-facerule@font-facerule@font-faceruleHowever, Safari, Chrome and Firefox all continue to render text using the font. Is this the expected behaviour? If so, could somebody point me to the part of the spec that defines it?