Woff2 not working in Safari
The .woff2 font (text-security-disc.woff2) is not working in Safari (13.0.5) (on iOS or on macOs), it's not showing anything.
V3 downloaded from https://github.com/noppa/text-security/releases
(the .ttf works though)
Thanks for the report.
Could you test with these versions: text-security-issue-10-test.zip
Extracting the zip and opening index.html in Safari should do the trick. I'm trying to determine if the issue is with the woff2 format or the cmap subtable 13 that the optimized version uses.
Tested the zipfile on macOs/Safari
"ttf font with cmap format 13" doesn't work "woff2 font with normal cmap" does work 👍
Thanks for testing, I was also able to repro the issue on Safari. So either Safari doesn't support the cmap format that the optimized version uses or there's something else wrong with the font that Safari doesn't like. I'm not sure yet which it is. I'll investigate more but it might take some time.
Luckily, Safari supports -webkit-text-security: disc so I think the best approach here is to use that with the font
@font-face {
font-family: 'text-security-disc';
src: url('text-security-disc-compat.eot'); /* EOT Fonts for IE */
src: url('text-security-disc-compat.eot?#iefix') format('embedded-opentype'),
url('text-security-disc.woff2') format('woff2'), /* Optimized font for Firefox */
url('text-security-disc-compat.ttf') format('truetype'); /* TTF Fallback */
}
.my-input {
font-family: text-security-disc;
-webkit-text-security: disc; /* Chrome, Safari, Edge */
}
This should still work in all browsers. Chrome, Safari and recent Chromium-based Edge versions will conceal the field with their own webkit-text-security thing without needing the font. Firefox will use the optimized woff2 font and IE will use the larger EOT font.
The only problem here that I can see is that Safari doesn't seem to support the other shapes in webkit-text-security so if you would've wanted to use some other shape than the default disc, this approach still doesn't work.
I'll add a woff2 build of the non-optimized versions tomorrow, it weighs 6 kt so it's not quite as nice as the fully optimized version (which is less than 1 kt), but seems to also work in Safari so if the
-webkit-text-security approach doesn't work for you that might be your best option. I'll also update the readme with this stuff.
@jvanmaaren This should be fixed in the default stylesheet of version 3.2 (release candidate). Could you verify by visiting https://noppa.github.io/text-security?