-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6acafc5
commit 997d5ad
Showing
7 changed files
with
40 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ Like Twemoji, this project can also replace the emoji on the web page with an im | |
Include the following in your HTML <head></head> : | ||
|
||
``` | ||
<script src="https://cdn.jsdelivr.net/gh/DellZHackintosh/[email protected].1/src/script/msemoji.min.js" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/DellZHackintosh/[email protected].2/src/script/msemoji.min.js" crossorigin="anonymous"></script> | ||
``` | ||
|
||
Then <body></body> add these in: | ||
|
@@ -70,7 +70,9 @@ msemoji.parse(document.body,{ | |
base: string, | ||
ext: string, | ||
className: string, | ||
folder: string | ||
folder: string, | ||
high_contrast: boolean, | ||
version: string | ||
}); | ||
``` | ||
|
||
|
@@ -94,13 +96,13 @@ Note: What you see now is some of the parameters supported by the script, which | |
|
||
This repository provides five emoji formats to choose from, and you can choose the right format for your website according to the actual situation. | ||
|
||
| Variant style | 2D | 3D | Flat | Color | High Contrast | | ||
|:--------------------------------:|:-------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | ||
| Example Appearance | ![](./src/2D/1f600.png) | ![](./src/3D/1f600.png) | ![](./src/Flat/1f600.svg) | ![](./src/Color/1f600.svg) | ![](./src/High%20Contrast/1f600.svg) | | ||
| The corresponding `ext` value | `.png` | `.png` | `.svg` | `.svg` | `.svg` | | ||
| The corresponding `folder` value | `2D` | `3D` | `Flat` | `Color` | `High Contrast` | | ||
| Features | The size is `72x72` pixels. Not scalable. | The size is `256x256`, which is clearer, more three-dimensional and lively than `2D` Scalable. Same style as `2D`, smaller size. | Scalable. Same style as `2D`, small size. | Scalable. Same style as `3D`. | Scalable. Suitable for people with disabilities or those who want to display emoji in black and white font. | | ||
| Pros | Good compatibility, low performance consumption, fast loading. | Good compatibility, less performance consumption, larger resolution, less blurry. | Be clear in any situation. Fast loading. | Be clear in any situation. | Actively small size. Make it easier for people with disabilities to read. | | ||
| Variant style | 2D | 3D | Flat | Color | High Contrast | | ||
|:--------------------------------:|:-------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | ||
| Example Appearance | ![](./src/2D/1f600.png) | ![](./src/3D/1f600.png) | ![](./src/Flat/1f600.svg) | ![](./src/Color/1f600.svg) | ![](./src/High%20Contrast/1f600.svg) | | ||
| The corresponding `ext` value | `.png` | `.png` | `.svg` | `.svg` | `.svg` | | ||
| The corresponding `folder` value | `2D` | `3D` | `Flat` | `Color` | `High Contrast` | | ||
| Features | The size is `72x72` pixels. Not scalable. | The size is `256x256`, which is clearer, more three-dimensional and lively than `2D` Scalable. Same style as `2D`, smaller size. | Scalable. Same style as `2D`, small size. | Scalable. Same style as `3D`. | Scalable. Suitable for people with disabilities or those who want to display emoji in black and white font. | | ||
| Pros | Good compatibility, low performance consumption, fast loading. | Good compatibility, less performance consumption, larger resolution, less blurry. | Be clear in any situation. Fast loading. | Be clear in any situation. | Actively small size. Make it easier for people with disabilities to read. | | ||
| Cons | Not scalable. Blurry on high-resolution screens or when viewed at larger sizes. | Not scalable. May be blurry when viewed in high resolution screens or at larger sizes. Larger than `2D` may slow down loading. | Slightly weaker compatibility. Heavy usage may slightly affect performance. | Limited by special bitmap rasterization, it may be problematic to display or scale on some devices, and is not as detailed as `3D` style. Larger than `Flat` may slow down loading. Heavy usage can affect performance. | The currently provided `high_contrast` parameter implements a slight issue with the functionality that emoji for some skin tone variants does not display correctly (Weird transcoding logic...), and there is no good solution yet. Avoid using emoji with a non-default skin tone in this style. | | ||
|
||
### ✨Adjust the display of Emoji | ||
|
@@ -164,6 +166,10 @@ Here are some ideas although you can do in other ways. | |
|
||
2. Use JavaScript. | ||
|
||
### 🆕NPM Support | ||
|
||
[msemoji](https://www.npmjs.com/package/msemoji) now available on NPM. | ||
|
||
## 🤔FAQ | ||
|
||
#### Why can't some emojis be displayed? | ||
|
Oops, something went wrong.