Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segoe UI Semilight in CSS not working on Chrome

I'm trying to use Segoe UI Light, Segoe UI Semilight, and Segoe UI on a web page. It renders great in IE, but Chrome doesn't seem to differentiate between Light and Semilight.

I'm using the CSS suggested on this StackOverflow answer, as suggested by Microsoft.

/*
Explicitly define a Segoe UI font-family so that we can assign Segoe UI 
Semilight to an appropriate font-weight.
*/
@font-face {
    font-family: "Segoe UI";
    font-weight: 200;
    src: local("Segoe UI Light");
}
@font-face {
    font-family: "Segoe UI";
    font-weight: 300;
    src: local("Segoe UI Semilight");
}
@font-face {
    font-family: "Segoe UI";
    font-weight: 400;
    src: local("Segoe UI");
}
@font-face {
    font-family: "Segoe UI";
    font-weight: 600;
    src: local("Segoe UI Semibold");
}
@font-face {
    font-family: "Segoe UI";
    font-weight: 700;
    src: local("Segoe UI Bold");
}
@font-face {
    font-family: "Segoe UI";
    font-style: italic;
    font-weight: 400;
    src: local("Segoe UI Italic");
}
@font-face {
    font-family: "Segoe UI";
    font-style: italic;
    font-weight: 700;
    src: local("Segoe UI Bold Italic");
}

The following jsfiddle shows various font weights of Segoe UI, including Light and Semilight: http://jsfiddle.net/nHXDA/

Here's the results.

Chrome:

enter image description here

IE:

enter image description here

Any ideas on how to fix this?

like image 960
Brent Traut Avatar asked Nov 25 '14 20:11

Brent Traut


People also ask

Is Segoe UI a Microsoft font?

Segoe (/ˈsiːɡoʊ/ SEE-goh) is a typeface, or family of fonts, that is best known for its use by Microsoft. The company uses Segoe in its online and printed marketing materials, including recent logos for a number of products.

Can I use Segoe font?

Unfortunately, even now it is not possible to legally use any of the Segoe UI or Segoe WP family fonts in your own materials (commercially or otherwise), it is also impossible to take the ones installed with the Windows OS and make a web fonts out of them (I tried with FontSquirrel and they are on the block list) and ...

Is Segoe UI font free?

Is Segoe Ui Free? This amazing typeface is free to use for all your projects. In the start, Monotype licensed this typeface however, later it disassociated with the Monotype and Microsoft took the charge. You can use the font free for your all projects and designs.


1 Answers

Beside the fact that your font will only be displayed on Windows Devices correctly while it will be ignored on all others that don't have the font installed you need to make sure you have a matching fallback in place.

The second thing is that your font definition is wrong and doesn't work cross browser. While Internet Explorer is able to use directly the correct font file, specified by src: local("Segoe UI Semibold"); all other browser need to refer to the font family. src: local("Segoe UI");.

In case of semibold you need to specify the font definition like this:

@font-face {
    font-family: "Segoe UI";
    font-weight: 300;
    src: local("Segoe UI Semilight"), local("Segoe UI");
}

Once you fixed your font definition it should look like the following screenshot shows. In those Screenshots you also see that if the font-family is specified with the full name instead of the font family name the font will fallback to Times New Roman. This happens because the browser cannot resolve the font name, which seems to be exclusive for IE.

Not sure if it is because I use the local font and if the available web font have been fixed you need to make additional adjustments to look the font good. It might be the case that the web fonts has special hinted for web use.

Various Screenshots of browsers

like image 133
Stefan Bauer Avatar answered Sep 29 '22 19:09

Stefan Bauer