What is the reason for Safari using different fonts on iPad compared to Mac?

Whenever I access our website through Safari and need Github authentication, I encounter this issue:

Please check the code snippet below:

Make sure to configure these settings:

.breadcrumb-link {
    font-family: SFPro-Medium;
    font-size: 22px;
    color: #c14953;
}

@font-face {
    font-family: SFPro-Medium;
    src: url(/fonts/SF-Pro.ttf);
    font-weight: medium;
    font-display: swap;
}

View on Mac:

https://i.sstatic.net/unhej.png

View on iPad:

https://i.sstatic.net/Zte6z.png

Answer №1

Be as precise as possible when specifying:

  1. Include the font format, such as "truetype"
  2. Also define the font-weight in your CSS class

Various versions of Safari and other browsers may vary in their interpretation of font-face rules.

CSS

@font-face {
    font-family: SFPro-Medium;
    src: url(/fonts/SF-Pro.ttf) format('truetype');
    font-weight: medium;
    font-display: swap;
}

.breadcrumb-link {
    font-family: SFPro-Medium;
    font-size: 22px;
    color: #c14953;
    font-weight: medium;
}

Common problems:

Verify that your font is being loaded through @font-face by checking the network tab in devtools. You might spot a local version initially.
Try using numerical font-weight values like 600 rather than "medium".
Check for any overriding CSS rules.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Top method for establishing multiple aliases for disabled elements in CSS

Is there a way to have two different disabled states for checkboxes, one with a gray background and the other with a blue background, while maintaining the same functionality? Code within file.css .overall-example input[type=checkbox]:checked + label { ...

Use jQuery to swap out every nth class name in the code

I am looking to update the 6th occurrence of a specific div class. This is my current code <div class="disp">...</div> <div class="disp">...</div> <div class="disp">...</div> <div class="disp">...</div> < ...

Setting the line-height property in CSS to a value greater than the font-size property

Dealing with a frustrating issue where I want to align the top of an image with text, but the letters end up slightly below the line height. Check out this simple example featuring a classic movie: HTML: <img src="http://cf2.imgobject.com/t/p/w92/wcI ...

A creative CSS technique to eliminate borders from ul elements without relying on the calc() function

I'm currently using the top bar component from Zurb Foundation and have added a 1px border at the top and a 3px border at the bottom of the nav tag. However, I am facing height issues because the ul menu inside is set to 100% height. What would be th ...

Tips for updating the css class for multiple DOM elements using jQuery

I am currently attempting to modify the class property of a specific DOM element (in this case, a label tag) using jQuery version 1.10.2. Here is the code snippet I have written: var MyNameSpace = MyNameSpace || {}; MyNameSpace.enableDisableLabels = (f ...

What is causing variations in the sizes of my HTML tables?

I am having some issues with a particular HTML snippet that I have included below: <table> <tbody> <tr> <td><table>...</table></td> <td><table>...</table></td> <td><tab ...

Isotope grid shatters when browser window is resized

My goal is to design a 3-column grid using Twitter Bootstrap and Isotope. However, when I resize the browser to force the layout into a single column mode, Isotope fails and leaves large spaces both vertically and horizontally. Regular Layout Issues in ...

Changing the position of an image can vary across different devices when using HTML5 Canvas

I am facing an issue with positioning a bomb image on a background city image in my project. The canvas width and height are set based on specific variables, which is causing the bomb image position to change on larger mobile screens or when zooming in. I ...

Adding classes to forms in Laravel 4 is a simple yet important step in custom

It may be a straightforward solution, but I haven't been able to locate any documentation on this topic. Recently, I created a form using Laravel 4 which is functioning as expected. However, the next step is to add some styling. How can I incorporate ...

Tips for creating a Bootstrap 5 navbar dropdown menu that opens on hover for desktop users and on click for mobile users

Just starting out in the world of Web Development, so any help would be greatly appreciated! I've been working on a Wordpress website for a company and encountered an issue with my CSS while implementing the Bootstrap 5 navbar. On desktop, the dropdo ...

Is there a bug with the CSS Safari selector for elements focused together?

Looking for a solution using the element+element-Selector to modify CSS for an element following a button. This code snippet functions in Chrome, Edge, and Firefox but not Safari on MacOS: .button:focus+.change{ color: red; } <p>When you focus ...

Impossible to create margins on both the left and right side

Check out this cool pen: http://codepen.io/helloworld/pen/BcjCJ?editors=110 I'm facing an issue where I'm unable to create both left and right margins around my datagrid. Only the left margin seems to be possible. Any suggestions on how I can f ...

I am struggling to find the right way to center those images

https://i.sstatic.net/aRkvl.jpg Hello everyone, I'm currently attempting to set up the main content of the homepage resembling the image provided, but I'm encountering some challenges. Every approach I take seems to cause the image to overflow ...

Bars of varying heights (Google Chart)

I have incorporated a Google chart within a mat-grid-tile. In this setup, one column displays a value of 50, while the other showcases a value of 30. These particular values are sourced from myService and are accurate. Although when I hover over the bars i ...

Understanding the behavior of Window.open() function with Http:// and Https:// protocols on iOS devices

I have a form that includes multiple fields along with two icons that redirect the user to a new tab. First Link <span class="uk-input-group-addon"> <a onclick="window.open('https://www.myURL.com/folder1/page_name', '_blank&apos ...

Designing an interactive HTML table that adapts to various screen

Currently utilizing Bootstrap to create a responsive HTML table on smaller devices like the iPad, but seeking a more polished and professional alternative. Searching for a JQuery/JavaScript or CSS solution without relying on plugins. Would appreciate any ...

Utilize SCSS values within TypeScript by applying them on a class level

let changeClassDisplay = document.getElementsByClassName('sidebar'); for (var i = 0; i < changeClassDisplay.length; i += 1) { changeClassDisplay[i].style.display = 'block'; } I encountered an issue with this code whe ...

Enhancing your website's design with dynamic CSS variables using JavaScript

Is there a way to update CSS variables specifically scoped under a certain CSS class (or even other complex CSS selectors) that are predefined in a stylesheet? This question extends beyond just CSS variables and includes other CSS properties as well, quest ...

Mobile devices consistently experiencing issues with JavaScript generated elements overlapping

I'm currently in the process of creating a quiz based on a tutorial I found at https://www.sitepoint.com/simple-javascript-quiz/. While I followed the tutorial closely and integrated Bootstrap, I am encountering an issue specifically with mobile devic ...

Has CSS3 been recognized as an official standard?

Can you confirm whether CSS3 has been officially recognized as a W3C standard or is it currently in the status of "CR" (Candidate Recommendation)? ...