-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printable unicode emoji #18
Merged
Merged
Conversation
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
The first implement is committed but currently we deal with trial and error. Besides this for better emoji support in theme, we are implementing PostCSS emoji font plugin to render colored emoji. |
We are ready for printing the unicode emoji. The example output is here (Outputted on Windows). # ❤️ Unicode emoji supports ❤️
❤️🧡💛💙💚💜
> The unicode emoji will render in low-resolution if you print slide deck to PDF in Chrome. So we are going to support the shortcode of emoji to render in a vector image. We have not employed an approach of the |
The previous version of Chrome has not rendered emoji in bold weight. But it has been fixed in current version. `font-weight: bold` might bring unexpected rendering about font weight if user use text based emoji font like Symbola. @see https://bugs.chromium.org/p/chromium/issues/detail?id=551843
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In pre-released Marp, we have fought against the unicode emoji in exported PDF.
Pre-released Marp + Apple emoji + The old version of Chrome (Electron 1.x)
prerender
directive on pre-released Marp.Marpit + Windows Segoe UI Emoji + Printing in the latest version of Chrome
Solution
In this PR, we will process a DOM tree generated by markdown-it and wrap unicode emoji by
<span data-marpit-emoji></span>
ifprintableEmoji
option is true. We will style it to be able to render the original emoji by creating a stacking context throughfilter
style.Actually we don't want to change the original DOM structure, but we allowed it because this change will become an unobtrusive change.
ToDo
data-marpit-emoji
inscaffold
theme<span data-marpit-emoji></span>
in the plugin[ ]printableEmoji
Initialize option (false
by default)printable
option to keep colored emoji