I’m experiencing an issue with Safari where a block of text using webfonts (not sure webfonts are the issue) is wrapping differently in Safari than it is in any other browser. In this particular instance, we’re designing these blocks to look like they’re set to text-align: justify;
but they’re actually set to text-align: left;
. text-align: justify;
is undesired in this setting as it does a poor job of calculating the space between words.
Important things to know:
- As I mentioned, the layout uses webfonts. It doesn’t matter which webfonts (I’ve reviewed hundreds and it happens for all).
- The entire page, including padding and font-size, uses viewport width (vw). The idea here is that the block of text scales equally for all browser sizes and retains it’s layout, including rags.
A visual aid:
Details about the layout and dimensions:
- Frame 1: Safari desktop.
- Frame 2: Chrome desktop.
- Frame 3: Chrome at 50% opacity over Safari.
- Window width in this screenshot is
1220px
. - Left/right padding is
padding: 0 calc(129 / 1220 * 100vw);
which computes to129px
. - That leaves the available content space of
962px
. letter-spacing
is set to 0 by default for all content.
So, anyone have any idea why Safari seems to have exaggerated tracking/letter-spacing?
EDIT
We just launched the site in question, so you can see the issue in action here: https://www.typography.com/fonts/hoefler-text/overview