4 ms·
Be aware that this appears by default to swap character pairs with unicode ligatures, which is fine, but those characters aren't included in many web fonts. It
by kibibu 2y ago
Be aware that this appears by default to swap character pairs with unicode ligatures, which is fine, but those characters aren't included in many web fonts.
It's better today (both for the above issue and also for usability) to disable the ligature substitution and let browser engines manage ligature replacement.
- starkparker 2y agoThis also breaks naive/literal search. For an example, copy and paste the "After" text into VSCode and try to search for "taking", "coladas", or "Exhibits". It won't match because of the ligatures. Browser search can typically parse Unicode ligatures, so it's not a huge usability problem. But saving, copying, or scraping the output and using tools that don't process ligatures into their component letters will fail. This also (very slightly, but still notably) abuses empty contentless <span>s to inject space through CSS margins. Also, the attempt to brute-force small caps by applying a font subset via a span doesn't work at all for me, in either Chrome or Firefox. It's a good effort, but I also can't think of a use case where the result is worth what this does to the markup.