Код: Выделить всё
body {
font-family: sans-serif;
font-size: 24px;
padding: 20px;
}
.text-container {
margin-bottom: 20px;
border: 1px solid #ccc;
padding: 10px;
}
.simsun {
font-family: "SimSun";
}
.bold {
font-weight: bold;
}
.no-synthesis {
font-synthesis-weight: none;
}< /code>
Original SimSun Text (Normal Weight)
SimSun Text with font-weight: bold (Browser may synthesize)
SimSun Text with font-weight: bold AND font-synthesis-weight: none (Should only be bold if actual bold face exists)
If the third example is NOT bold, it suggests the browser was synthesizing the bold for the second example.
< /code>
< /div>
< /div>
< /p>
Сравните второй и третий абзацы, чтобы сделать вывод, синтезирует ли ваш браузер для Simsun: < /p>
, если третий параграф не является Brold, I. То, что браузер синтезировал смелую версию для второго абзаца. /> < /li>
< /ol>
Когда я тестировал в последнем браузере Firefox, третий абзац не сжимается, поэтому браузер полагался на синтез, что означает, что истинный жирный вариант Simsun не был доступен. Это противоречит ожиданию, что Font-Synthesis-Weight: None;
Код: Выделить всё
body {
font-family: sans-serif;
font-size: 24px;
padding: 20px;
}
.text-container {
margin-bottom: 20px;
border: 1px solid #ccc;
padding: 10px;
}
.ms-gothic {
font-family: "MS Gothic";
}
.bold {
font-weight: bold;
}
.no-synthesis {
font-synthesis-weight: none;
}< /code>
Original MS Gothic Text (Normal Weight)
MS Gothic Text with font-weight: bold (Browser may synthesize)
MS Gothic Text with font-weight: bold AND font-synthesis-weight: none (Should only be bold if actual bold face exists)
If the third example is NOT bold, it suggests the browser was synthesizing the bold for the second example.
Подробнее здесь: https://stackoverflow.com/questions/796 ... n-and-ms-g