So here's my silly problem: Emoji can look bad when they are printed with high 'weight' as characters. This leads to a situation where, when you are defining your style sheet, you have to pick if you would like to make normal text look good (use bold) or if you would like emojis to look good (use normal).
Here's a jsfiddle to demonstrate: https://jsfiddle.net/xjqaLypb/10/
HTML:
<body>
<div class="a">
TEXT
</div>
<div class="b">
TEXT
</div>
</body>
CSS:
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('../fonts/roboto-v20-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/roboto-v20-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/roboto-v20-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/roboto-v20-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}
@font-face {
font-family: emoji;
src: local('Apple Color Emoji'),
local('Apple Symbols'),
local('Android Emoji'),
local('Segoe UI'),
local(EmojiSymbols),
local(Symbola),
url('font/Symbola-Emoji.eot?#iefix') format('embedded-opentype'),
url('font/Symbola-Emoji.woff') format('woff'),
url('font/Symbola-Emoji.ttf') format('truetype');
font-weight: 300;
/* Emoji unicode blocks */
unicode-range: U+1F300-1F5FF, U+1F600-1F64F, U+1F680-1F6FF, U+2600-26FF;
}
body {
font-family: 'Roboto', sans-serif;
}
.a {
font-weight: 700; /* bold */
font-size: 2rem;
}
.b {
font-weight: 400; /* normal */
font-size: 2rem;
}
The Text looks more "heading-y" when it's bolded, the emojis look more "heading-y" when they are normal.
How can I solve this? Is there a way to apply different weight rules to emojis and 'regular' text?
Edit: The context for this is that, as you can see, mixing text and in the same elements makes for difficult typography. I'm trying to setup a static site generator to support attractively printing s and text in the same elements.
Edit #2: So I tried using @font-family and I have updated the jsfiddle showing the results. There seem to be two problems - the first is that I'm not sure how to specify the font weight for a fond under a particular style. I.e. how do I specify that, for example, Roboto should be 700 weight when "bold" and the Emoji sets should be 300 weight when "bold"?
The second, more insurmountable problem is that, even though the browser knows that it is using an font, the document rules say to use the document font (Roboto) and so it styles the emoji font with the Roboto font-family style.
