🎥 Make videos programmatically with React
Docs: Emojis
Jonny Burgere80c172e9842
diff --git a/packages/docs/docs/miscellaneous/emojis.mdx b/packages/docs/docs/miscellaneous/emojis.mdxnew file mode 100644index 0000000000..b8136f96e6--- /dev/null+++ b/packages/docs/docs/miscellaneous/emojis.mdx@@ -0,0 +1,35 @@+---+image: /generated/articles-docs-miscellaneous-emojis.png+sidebar_label: Emojis+title: Emojis+crumb: Font rendering+---++Emojis are always rendered as-is by the operating system.+By nature, they are different across different OS:++- [Windows Emoji Set](https://emojipedia.org/microsoft)+- [macOS and iOS Emoji Set](https://emojipedia.org/apple)+- Different Linux distributions have different sets of emojis, or none at all.++## Emojis on Linux and in Docker++When rendering in the cloud or in Linux in general, you will not get the same emojis as on your Desktop.+You can install open source emoji fonts for your operating system:++### Debian/Ubuntu:++```docker+apt-get install fonts-noto-color-emoji+```++### Amazon Linux 2023:++```docker+yum install google-noto-emoji-color-fonts+```++## Emojis on Remotion Lambda++[Noto Color Emoji are installed on Remotion Lambda](/docs/lambda/runtime#fonts) by default.+Replacing the emojis is only possible by [customizing Remotion Lambda](/docs/lambda/custom-layers).diff --git a/packages/docs/docs/the-fundamentals.mdx b/packages/docs/docs/the-fundamentals.mdxindex 4ee74650dc..c216c4b4f2 100644--- a/packages/docs/docs/the-fundamentals.mdx+++ b/packages/docs/docs/the-fundamentals.mdx@@ -2,7 +2,7 @@image: /generated/articles-docs-the-fundamentals.pngid: the-fundamentalstitle: The fundamentals-crumb: 'Getting started'+crumb: Getting started---## React components@@ -10,6 +10,8 @@ crumb: 'Getting started'```twoslash include exampleimport { AbsoluteFill, useCurrentFrame } from "remotion";++export const MyComposition = () => {const frame = useCurrentFrame();@@ -52,20 +54,20 @@ You can obtain these values from the [`useVideoConfig()`](/docs/use-video-configimport {AbsoluteFill, useVideoConfig} from 'remotion';export const MyComposition = () => {- const {fps, durationInFrames, width, height} = useVideoConfig();-- return (- <AbsoluteFill- style={{- justifyContent: 'center',- alignItems: 'center',- fontSize: 60,- backgroundColor: 'white',- }}- >- This {width}x{height}px video is {durationInFrames / fps} seconds long.- </AbsoluteFill>- );+ const {fps, durationInFrames, width, height} = useVideoConfig();++ return (+ <AbsoluteFill+ style={{+ justifyContent: 'center',+ alignItems: 'center',+ fontSize: 60,+ backgroundColor: 'white',+ }}+ >+ This {width}x{height}px video is {durationInFrames / fps} seconds long.+ </AbsoluteFill>+ );};```@@ -85,16 +87,16 @@ import {Composition} from 'remotion';// ---cut---export const RemotionRoot: React.FC = () => {- return (- <Composition- id="MyComposition"- durationInFrames={150}- fps={30}- width={1920}- height={1080}- component={MyComposition}- />- );+ return (+ <Composition+ id="MyComposition"+ durationInFrames={150}+ fps={30}+ width={1920}+ height={1080}+ component={MyComposition}+ />+ );};```diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 77bff4afbe..6856d5d3df 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -929,6 +929,7 @@ module.exports = {'gl-options','bun','standalone',+ 'miscellaneous/emojis',],},{diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 8e91f27679..a615d3b658 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -1591,6 +1591,13 @@ export const articles = [compId: 'articles-docs-miscellaneous-render-on-edge',crumb: 'FAQ',},+ {+ id: 'miscellaneous/emojis',+ title: 'Emojis',+ relativePath: 'docs/miscellaneous/emojis.mdx',+ compId: 'articles-docs-miscellaneous-emojis',+ crumb: 'Font rendering',+ },{id: 'miscellaneous/cloud-gpu-docker',title: 'Setup EC2 for Docker with GPU',diff --git a/packages/docs/static/generated/articles-docs-miscellaneous-emojis.png b/packages/docs/static/generated/articles-docs-miscellaneous-emojis.pngnew file mode 100644index 0000000000..3f140cecedBinary files /dev/null and b/packages/docs/static/generated/articles-docs-miscellaneous-emojis.png differ