Chrome is not displaying my emoji correctly - html

I'm using Chrome Version 68.0.3440.106 (Official Build) (64-bit) on macOS Sierra 10.12.6.
I have the following code:
<div class="emoji">☺️</div>
It's rendering this:
Instead of this:
It only happens with this specific emoji. All others work fine. Why?

If you are a developer trying to fix that on your website try adding some font-family to emoji. This one worked for same issue I had.
font-family: apple color emoji, segoe ui emoji, noto color emoji, android emoji, emojisymbols, emojione mozilla, twemoji mozilla, segoe ui symbol;
If you are the user, you can install chrome extension which handles emojis chromoji

I know that my answer is a bit late. But I've faced with the same problem and solve it through adding to my CSS file #font-face import. Also I've downloaded NotoColorEmoji font by Google. Here is page of this font. TrueType file is on it's github. So, after this even Chromium displays emojis on my site correctly.

The CSS properties in this answer were a good attempt at making emoji "just work", but as the blog post The struggle of using native emoji on the web illustrates, it can have unintended side effects.
One problem is that the fonts treat special characters like #, * and numbers as emoji. So you need to be selective about which parts of the text have the font-family applied, and be sure the text is actually something that should be unconditionally treated as emoji.
Even if it does appear to work, the emoji that will be shown varies by OS and browser, so it's inconsistent at best.
Ultimately, I gave up on trying to make emoji work for my use case.

Related

Font looks completely different in Windows

A client is using the PT Sans Regular font on their website and complaining that certain letters, like capital D, are being cut off at the top. I've confirmed that it's happening in all browsers on Windows. IE11, Chrome and Firefox. It looks fine on Mac. The problem persists when I change the font size, weight, line-height, etc. I'm stumped. Any suggestions?
Please convert your font again with all web supportive fonts format's and used it.
For conversion font I mostly used the below url:
http://www.fontconverter.org/
Write custom font face in style sheet to render the font.

Weird Behaviour in iOS Safari with Different Languages in the Same String

I have a really strange behaviour in Safari. The problem is that I have a string (inside an tag) which has one part of it written in cyrillic (Bulgarian) and the other part written in latin (English).
On all the desktop browsers I have, it's all working good and there are no problems at all. Then I took my iPhone, and I noticed a surprise: part of the sentence is bold (as it should be according to the CSS), and part is normal.
You can see this weird behaviour here:
http://www.buderus-bg.com/bultherm/product/10
What can it be? And why I get this problem only on iOS?
The charset of the website UTF-8. And that field in the database is a utf8_general_ci.
You are trying to display the text using a font that doesn't contain Cyrillic characters (Google's Open Sans with subset=latin), so the browser will need to find a different font to display the Cyrillic text.
Solution: remove the subset=latin bit.
Edit: the fact that it happens only in iOS with Safari is a coincidence. The browser searches for a font that can display the Cyrillic characters, and what it finds is sufficiently different from Open Sans that you can see the difference in thickness. On my desktop machine, I see the difference too.

My font differs in chrome browser

I have a website, which is a internet forum, and in my forum posts, I have the following font:
font-family: 'Segoe UI',Tahoma,Arial,Helvetica,sans-serif;
Now, here's how it looks like in different browsers: (from left: chrome, firefox, IE)
As you can see, chrome is displaying whole different font than the other two. Why? How do I fix that (I want this font to look like the other two)? Also, this is the link to the page I made screenshot of: https://scyk.pl/Forums/Thread/Na%20luzie/8 (look at the post contents)
What is happening is that Google Chrome most likely does not have that font, and is using the fall back fonts instead. To make sure this doesn't happen, you can explicitly load the font using
#font-face
in CSS3, which allows you to explicitly load the fonts by referencing it. You can learn more about using #font-face HERE, where you use src: and get the url of whatever font you are using.
If the font is not that important, however, I recommend not worrying about it and just letting Chrome use the fallback fonts instead.
To do #font-face, the code would be:
#font-face {
font-family:Segoe UI;
src:url(https://github.com/shawnphoffman/shawnphoffman.com/blob/master/Content/fonts/segoe-ui-semilight.woff);
}
You may have to go to the github link and download the raw version of the font, then reference it there.
You have several options but I think you'll find all of them unsatisfactory:
Render the page into an image on the server and send that to the client.
Get the source code for Chrome and replace the font rendering engine with the one used by Firefox.
Oh, btw, it will also look different on Safari (probably a lot different to the other three; Safari is a very sophisticated browser and it will try it's utmost to make a page look good; driving web designers insane in the process is a small price to pay for beauty ;-)).
Rendering text is something that you only have limited control over. Maybe Chrome doesn't find Segoe UI, maybe the font rendering engine can't use the hinting of your font. While not ideal, I suggest not to spend too much time on it.

How do I get ligatures in Google Font API to display in Google Chrome?

I'm using Google Font API to display my website logo. (See top of stolencamerafinder.com)
In Chrome the letters 'f' and 'i' appear seperately, but in FireFox, they are a nice joined ligature
How do I force Chrome to use the ligature?
If I use the ligature ascii character (fi) in the html then it doesn't use the font, it falls back to arial, yet the font (OFL Sorts Mill Goudy TT) must support that ligature since firefox displays it.
Update: I ended up ditching Google font API in favour of plain #font-face. More choice on fontsquirrel.com anyway.
Short answer: This feature isn't implemented yet.
Long answer: Take a look at http://crbug.com/22240 ( http://crbug.com/64479 might also be interesting).
Is it possible that in webkit browsers this property wasn't yet devoloped?
Or is it a problem of the type of font used by webkit browsers? (TrueType, Woff instead of Opentype)?
EDIT: In Safari this works with some fonts that support ligatures.
For example it works with the default browser font (Times on Mac Os X), while it doesn't work with a couple of Google fonts I was trying with #font-face CSS feature.

Fixing ugly Greek symbols?

When displaying Greek symbols with, for example, π, I get very different results in Chrome and Safari versus Firefox. As some example text, I have:
Chrome:
Firefox:
Is there a way to get Webkit to render the letters closer to Gecko's style, which I much prefer here?
EDIT: Actually, it seems the problem does not have to do with Webkit itself, as it seems to render the way I like it under Chrome in Windows 7: (I was using Snow Leopard and didn't bother to check on my other computers, heh)
Also, a bit offtopic, but does anyone know why the fonts seem to be rendered a bit more boldly on the Mac than on the PC?
I would guess that firefox is using the Symbol font, whereas Safari is using whichever unicode font has the right characters.
On my Mac, this works: <span style="font-family: Symbol">π</span>. Also, setting the font of the container to Times New Roman seems to work as well.
Okay, so the weirdest thing happened. I was looking at my site again and suddenly realized that the Greek was rendering perfectly. Am not sure what happened, since I don't think I ran any updates or anything, but the problem's gone now. Not very helpful of course to others with this problem, but that's just what happened...
Your browser will render using whatever fonts it has available. Some fonts may be missing certain characters, in which case the browser will use another font for those characers. If, in your CSS, you tell the browser what the font-family is, it can better pick a matching font.
font: "Times New Roman", serif;
Now the browser will pull in missing characters from a serif font.
Of course, with the #font-face directive, you can force the use of a font which has all the characters you need.