css - How do you prevent Chrome (or phone internet browsers in general) on an android device from substituting non-standard Unicode symbols for Emojis? -
hello stackoverflow—to make i'm asking more clear, i'll elaborate.
i'm using following symbols in rotation transformation: ☎ , ♦ , ✔ (☎ , ♦ , ✔ respectively)
.
on android device though (smart phone, lg g4), replaces these text symbols non-text picture emojis not format transformation or font size styles.
i want force browser use regular symbols in font have supplied on website (using @font-face included .ttf file). on desktops, have no issues @ displaying selected symbols intended.
your appreciated i'd rather not forced make image substitute of text arrangement. thank you.
you should include webfont support characters want use.
to include icon font in css, use following code :
@font-face { font-family: 'myfont'; src:url('fonts/myfont.eot?-td2xif'); src:url('fonts/myfont.eot?#iefix-td2xif') format('embedded-opentype'), url('fonts/myfont.woff?-td2xif') format('woff'), url('fonts/myfont.ttf?-td2xif') format('truetype'), url('fonts/myfont.svg?-td2xif#myfont') format('svg'); // different urls required optimal browser support // make sure : // 1) replace urls font's urls // 2) replace `#myfont` name of font font-weight: normal; // avoid font inherits boldness font-style: normal; // avoid font inherits obliqueness or italic } .emoji { font-family: 'myfont', verdana, arial, sans-serif; // use regular fonts fallback speak: none; // avoid screen readers trying read content font-style: normal; // avoid font inherits obliqueness or italic font-weight: normal; // avoid font inherits boldness font-variant: normal; // avoid font inherits small-caps text-transform: none; // avoid font inherits capitalization/uppercase/lowercase line-height: 1; // avoid font inherits undesired line-height -webkit-font-smoothing: antialiased; // improved readability on webkit -moz-osx-font-smoothing: grayscale; // improved readability on osx + mozilla }
you can include symbol this:
<span class="icon">☎</span> <span class="icon">✉</span>
if don't know webfont supports character, can create 1 using icomoon app. see open source emoji icon font example of icon font support 650 symbols, created icomoon app.
if plan on using icon font (or other icon font), recommend edit font in icomoon app remove symbols except ones need, reduce filesize significantly!
more info:
Comments
Post a Comment