### Install npm dependencies Source: https://github.com/hfg-gmuend/openmoji/blob/master/CONTRIBUTING.md Run this command in the openmoji folder to install all required Node.js packages. This is necessary before running tests or scripts. ```bash npm install ``` -------------------------------- ### Install pngquant dependency Source: https://github.com/hfg-gmuend/openmoji/blob/master/helpers/README.md Install pngquant, required by some helper scripts, on macOS or Ubuntu. ```bash brew install pngquant ``` ```bash apt-get install pngquant ``` -------------------------------- ### Example array of color strings Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md Shows an example of an array of color strings used in the color_palette. ```javascript [ '#debb90', '#c19a65', '#a57939', '#6a462f', '#352318' ] ``` -------------------------------- ### Navigate to the openmoji folder Source: https://github.com/hfg-gmuend/openmoji/blob/master/CONTRIBUTING.md Use this command to change to the directory where you downloaded the OpenMoji repository. This is the first step before installing dependencies. ```bash cd path/to/folder ``` -------------------------------- ### Install OpenMoji via npm Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Install the OpenMoji NPM package. Individual files can also be fetched directly from UNPKG, e.g., unpkg.com/openmoji@12.1.0/color/svg/1F64B.svg. ```bash npm install openmoji ``` -------------------------------- ### Install OpenMoji Jekyll plugin Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Install the OpenMoji Jekyll plugin via RubyGems. ```bash gem install jekyll-openmoji ``` -------------------------------- ### Install OpenMoji fonts on Fedora Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Install the OpenMoji fonts package on Fedora 33 and newer using yum. ```bash sudo yum install hfg-gmuend-openmoji-fonts-all ``` -------------------------------- ### Install shellcheck dependency Source: https://github.com/hfg-gmuend/openmoji/blob/master/helpers/README.md Install shellcheck, required by some helper scripts, on macOS. ```bash brew install shellcheck ``` -------------------------------- ### Install librsvg dependency Source: https://github.com/hfg-gmuend/openmoji/blob/master/helpers/README.md Install librsvg, required by some helper scripts, on macOS or Ubuntu. ```bash brew install librsvg ``` ```bash apt-get install librsvg2-bin ``` -------------------------------- ### openmoji.version Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md The current package version string. ```APIDOC ## openmoji.version ### Description The current package version string. ### Returns - **string** - The version string. ``` -------------------------------- ### Force Pretty Source with SVGO Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Finds all SVG files in src/ and runs SVGO with a beautify config to format them. ```bash find src/ -type f -name '*.svg' -print0 | xargs -0 -n 1 -P 6 node_modules/.bin/svgo --config helpers/beautify-svg.yml ``` -------------------------------- ### Navigate to OpenMoji directory Source: https://github.com/hfg-gmuend/openmoji/blob/master/font/README.md Change to the OpenMoji project folder before running the font builder. ```bash cd path/to/openmoji ``` -------------------------------- ### Run the font builder script Source: https://github.com/hfg-gmuend/openmoji/blob/master/font/README.md Executes the font builder with an optional version argument. The initial build can take several hours. ```bash ./helpers/generate-fonts.sh [version] ``` -------------------------------- ### Login to npm with npm login Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to log in to npm if not already logged in. ```bash npm login ``` -------------------------------- ### Generate production files with npm run generate Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to export production color and black files. Required before generating fonts and zips. ```bash npm run generate ``` -------------------------------- ### Run tests with npm test Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to run the test suite for OpenMoji. Ensure all tests pass before proceeding with a release. ```bash npm test ``` -------------------------------- ### Check npm login status with npm whoami Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to verify you are logged in to npm before publishing. ```bash npm whoami ``` -------------------------------- ### Export 512x512 zip for Emojipedia with npm run export-emojipedia Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to export a 512x512 zip for Emojipedia. ```bash npm run export-emojipedia ``` -------------------------------- ### Generate OpenMoji fonts with npm run generate-fonts Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to generate the OpenMoji fonts. Replace [version] with the version number. ```bash npm run generate-fonts [version] ``` -------------------------------- ### Publish node package with npm publish Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to publish the OpenMoji node package to npm. ```bash npm publish ``` -------------------------------- ### Clone OpenMoji repository with git Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Clone the OpenMoji repository without the full history to save bandwidth and time. The --depth 1 flag is recommended because the repo is large. ```bash git clone --depth 1 https://github.com/hfg-gmuend/openmoji.git ``` -------------------------------- ### Use OpenMoji via CDN Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Fetch OpenMoji files from jsDelivr CDN. This URL always fetches the latest version; pin to a specific version by following the jsDelivr documentation. ```text cdn.jsdelivr.net/gh/hfg-gmuend/openmoji/color/svg/1F63A.svg ``` -------------------------------- ### Export release zips with npm run export-zip Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Command to export release zips for sizes 72x72, 618x618, and SVG. ```bash npm run export-zip ``` -------------------------------- ### Set up OpenMoji @font-face with unicode-range Source: https://github.com/hfg-gmuend/openmoji/blob/master/font/README.md Defines the OpenMoji font-family using a WOFF2 file from jsDelivr. Includes a comprehensive unicode-range to cover emoji characters. Use this in your CSS to load the font. ```css /* see most recent unicode-range in https://github.com/hfg-gmuend/openmoji/blob/master/font/OpenMoji-color-glyf_colr_0/openmoji.css */ @font-face { font-family: "OpenMoji"; src: url("https://cdn.jsdelivr.net/gh/hfg-gmuend/openmoji/font/OpenMoji-color-glyf_colr_0/OpenMoji-color-glyf_colr_0.woff2") format("woff2"); unicode-range: U+23,U+2A,U+2D,U+30-39,U+A9,U+AE,U+200D,U+203C,U+2049,U+20E3,U+2117,U+2120,U+2122,U+2139,U+2194-2199,U+21A9,U+21AA,U+229C,U+231A,U+231B,U+2328,U+23CF,U+23E9-23F3,U+23F8-23FE,U+24C2,U+25A1,U+25AA-25AE,U+25B6,U+25C0,U+25C9,U+25D0,U+25D1,U+25E7-25EA,U+25ED,U+25EE,U+25FB-25FE,U+2600-2605,U+260E,U+2611,U+2614,U+2615,U+2618,U+261D,U+2620,U+2622,U+2623,U+2626,U+262A,U+262E,U+262F,U+2638-263A,U+2640,U+2642,U+2648-2653,U+265F,U+2660,U+2663,U+2665,U+2666,U+2668,U+267B,U+267E,U+267F,U+2691-2697,U+2699,U+269B,U+269C,U+26A0,U+26A1,U+26A7,U+26AA,U+26AB,U+26B0,U+26B1,U+26BD,U+26BE,U+26C4,U+26C5,U+26C8,U+26CE,U+26CF,U+26D1,U+26D3,U+26D4,U+26E9,U+26EA,U+26F0-26F5,U+26F7-26FA,U+26FD,U+2702,U+2705,U+2708-270D,U+270F,U+2712,U+2714,U+2716,U+271D,U+2721,U+2728,U+2733,U+2734,U+2744,U+2747,U+274C,U+274E,U+2753-2755,U+2757,U+2763,U+2764,U+2795-2797,U+27A1,U+27B0,U+27BF,U+2934,U+2935,U+2B05-2B07,U+2B0C,U+2B0D,U+2B1B,U+2B1C,U+2B1F-2B24,U+2B2E,U+2B2F,U+2B50,U+2B55,U+2B58,U+2B8F,U+2BBA-2BBC,U+2BC3,U+2BC4,U+2BEA,U+2BEB,U+3030,U+303D,U+3297,U+3299,U+E000-E009,U+E010,U+E011,U+E040-E06D,U+E080-E0B4,U+E0C0-E0CC,U+E0FF-E10D,U+E140-E14A,U+E150-E157,U+E181-E189,U+E1C0-E1C4,U+E1C6-E1D9,U+E200-E216,U+E240-E269,U+E280-E283,U+E2C0-E2C4,U+E2C6-E2DA,U+E300-E303,U+E305-E30F,U+E312-E316,U+E318-E322,U+E324-E329,U+E32B,U+E340-E348,U+E380,U+E381,U+F000,U+F77A,U+F8FF,U+FE0F,U+1F004,U+1F0CF,U+1F10D-1F10F,U+1F12F,U+1F16D-1F171,U+1F17E,U+1F17F,U+1F18E,U+1F191-1F19A,U+1F1E6-1F1FF,U+1F201,U+1F202,U+1F21A,U+1F22F,U+1F232-1F23A,U+1F250,U+1F251,U+1F260-1F265,U+1F300-1F321,U+1F324-1F393,U+1F396,U+1F397,U+1F399-1F39B,U+1F39E-1F3F0,U+1F3F3-1F3F5,U+1F3F7-1F4FD,U+1F4FF-1F53D,U+1F549-1F54E,U+1F550-1F567,U+1F56F,U+1F570,U+1F573-1F57A,U+1F587,U+1F58A-1F58D,U+1F590,U+1F595,U+1F596,U+1F5A4,U+1F5A5,U+1F5A8,U+1F5B1,U+1F5B2,U+1F5BC,U+1F5C2-1F5C4,U+1F5D1-1F5D3,U+1F5DC-1F5DE,U+1F5E1,U+1F5E3,U+1F5E8,U+1F5EF,U+1F5F3,U+1F5FA-1F64F,U+1F680-1F6C5,U+1F6CB-1F6D2,U+1F6D5-1F6D7,U+1F6DC-1F6E5,U+1F6E9,U+1F6EB,U+1F6EC,U+1F6F0,U+1F6F3-1F6FC,U+1F7E0-1F7EB,U+1F7F0,U+1F90C-1F93A,U+1F93C-1F945,U+1F947-1F9FF,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FBC5-1FBC9,U+E0061-E0067,U+E0069,U+E006C-E0079,U+E007F; } ``` -------------------------------- ### Rebuild libxmljs under correct Node version Source: https://github.com/hfg-gmuend/openmoji/blob/master/AGENTS.md If test coverage count looks off or you see a dlopen or 'incompatible architecture' error, run this command under the correct Node version before trusting npm test. This addresses libxmljs native binary mismatches that can silently crash mocha --parallel workers. ```bash npm rebuild libxmljs ``` -------------------------------- ### Structure of openmoji.color_palette Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md Shows the structure of the color_palette object, containing colors and skintones arrays. ```javascript { colors: skintones: { fitzpatric: , shadow: , hair: } } ``` -------------------------------- ### Normalize all SVG files in src folder Source: https://github.com/hfg-gmuend/openmoji/blob/master/CONTRIBUTING.md Run this command to normalize the formatting of all SVG files in the src folder. This may take some time. ```bash npm run pretty-src-svg ``` -------------------------------- ### openmoji.color_palette Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md Colors and skintones allowed in the emojis. Provides arrays of color strings for general colors and skintone categories. ```APIDOC ## openmoji.color_palette ### Description Colors and skintones allowed in the emojis. ### Properties - **colors** (array of strings) - An array of color strings. - **skintones** (object) - Contains arrays of color strings for fitzpatric, shadow, and hair. ### Example ```javascript { colors: , skintones: { fitzpatric: , shadow: , hair: } } ``` Where an array of color strings is structurally similar to: ```javascript [ '#debb90', '#c19a65', '#a57939', '#6a462f', '#352318' ] ``` ``` -------------------------------- ### Basic usage of OpenMoji Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md Require the openmoji module, access the first emoji object, and retrieve its properties including emoji, hexcode, tags, and image paths. ```javascript > const openmoji = require('openmoji') > const om = openmoji.openmojis[0] > om.emoji 'πŸ˜€' > om.hexcode '1F600' > om.openmoji_tags 'smile, happy' > om.openmoji_images.color.svg '/path/to/your/local/openmoji/color/svg/1F600.svg' > openmoji.color_palette.colors[23] '#186648' > openmoji.color_palette.skintones.hair[4] '#000000' ``` -------------------------------- ### Normalize an individual SVG file with svgo Source: https://github.com/hfg-gmuend/openmoji/blob/master/CONTRIBUTING.md Use this command to normalize a single SVG file, specifying the file path and the beautify configuration file. ```bash node_modules/.bin/svgo src/activities/arts-crafts/1F3A8.svg --config helpers/beautify-svg.yml ``` -------------------------------- ### Run specific tests with mocha Source: https://github.com/hfg-gmuend/openmoji/blob/master/CONTRIBUTING.md This command runs all tests matching the pattern 'layer existing' using mocha. It requires the openmoji data JSON and source folder paths. Useful for checking consistency of SVG layers. ```bash node_modules/.bin/mocha --grep "layer existing" test/*.js --openmoji-data-json $PWD/data/openmoji.json --openmoji-src-folder $PWD/src ``` -------------------------------- ### Use OpenMoji Awesome CSS class Source: https://github.com/hfg-gmuend/openmoji/blob/master/README.md Use OpenMoji Awesome CSS classes in HTML, e.g., , ready for websites. ```html ``` -------------------------------- ### Autoresponder Out of Office GitHub Actions workflow Source: https://github.com/hfg-gmuend/openmoji/wiki/Home GitHub Actions workflow that automatically responds to new issues, comments, and pull requests with a message indicating the project is on hold. ```yaml name: Autoresponder Out of Office on: issues: types: [opened] issue_comment: types: [created] pull_request: types: [opened] jobs: auto-response: runs-on: ubuntu-latest steps: - uses: derekprior/add-autoresponse@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: respondableId: ${{ github.event.issue.node_id }} response: "🏝 OpenMoji is on hold over summer (project maintainers are out of office until Oct 2020)." author: ${{ github.event.issue.user.login }} exemptedAuthors: "carlinmack, b-g" ``` -------------------------------- ### Convert emoji to OpenMoji PNG with Python Source: https://github.com/hfg-gmuend/openmoji/blob/master/FAQ.md Use this script to convert an emoji to an OpenMoji PNG image. It builds the emoji code from Unicode code points, removes the FE0F variation selector when present, and fetches the PNG from the OpenMoji GitHub repository. The script returns a PIL Image object. ```python from PIL import Image import requests def get_emoji(emoji): emoji_code = "-".join(f"{ord(c):04x}" for c in emoji).upper() if len(emoji_code) == 10: emoji_code = emoji_code.removesuffix("-FE0F") url = f"https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/72x72/{emoji_code}.png" im = Image.open(requests.get(url, stream=True).raw) # image = np.array(im.convert("RGBA")) return im get_emoji("🦴") get_emoji("🐿️") get_emoji("5️⃣") get_emoji("πŸ‘©β€βš•οΈ") get_emoji("🏳️") ``` -------------------------------- ### Chain nvm use into every command Source: https://github.com/hfg-gmuend/openmoji/blob/master/AGENTS.md Agent shells don't auto-source .nvmrc and nvm use doesn't persist across separate tool calls. Chain the source and nvm use commands into every command to ensure the correct Node version (v22.14.0) is active. ```bash source ~/.nvm/nvm.sh && nvm use && ``` -------------------------------- ### Bash script to fix case-sensitivity for multiple files Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Script that renames SVG files from lowercase to uppercase hex codes in both black and color directories. ```bash #!/usr/bin/env bash SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" cd "$SCRIPTPATH" hexcodes=("2b0c" "2b0d" "2b8f") for hex_lower in ${hexcodes[@]}; do hex_upper=$(echo "$hex_lower" | awk '{print toupper($0)}') echo ${hex_lower} ${hex_upper} git mv data/black/svg/${hex_lower}.svg data/black/svg/${hex_upper}.svg git mv data/color/svg/${hex_lower}.svg data/color/svg/${hex_upper}.svg done ``` -------------------------------- ### Fix case-sensitivity file name issue with git mv Source: https://github.com/hfg-gmuend/openmoji/wiki/Home Renames a file to fix case differences between case-sensitive and case-insensitive file systems. ```bash git mv black/svg/2b0c.png black/svg/2B0C.png ``` -------------------------------- ### Structure of an openmoji datum Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md Shows the structure of an object in the openmoji.openmojis array, including emoji, hexcode, group, tags, and image paths. ```javascript { emoji: 'πŸ˜€', hexcode: '1F600', group: 'smileys-emotion', subgroups: 'face-smiling', annotation: 'grinning face', tags: 'face, grin', openmoji_tags: 'smile, happy', openmoji_author: 'Emily JΓ€ger', openmoji_date: '2018-04-18', skintone: '', skintone_combination: '', skintone_base_emoji: '', skintone_base_hexcode: '', unicode: 1, order: 1, openmoji_images: { black: { svg: '/path/to/your/local/openmoji/black/svg/1F600.svg' }, color: { svg: '/path/to/your/local/openmoji/color/svg/1F600.svg' } } } ``` -------------------------------- ### Convert emoji to OpenMoji SVG with JavaScript Source: https://github.com/hfg-gmuend/openmoji/blob/master/FAQ.md Add this script to any website to convert an emoji to an OpenMoji SVG image. It computes the emoji code point sequence, removes the FE0F variation selector for certain emojis, and constructs the URL to the color SVG on openmoji.org. The script writes an tag with the SVG to the document. ```html ``` -------------------------------- ### openmoji.openmojis Source: https://github.com/hfg-gmuend/openmoji/blob/master/API.md An array of OpenMoji emoji data objects. Each object contains emoji character, hexcode, group, tags, and image paths. ```APIDOC ## openmoji.openmojis ### Description An array of openmoji emoji data. Each emoji datum has the following structure. ### Properties - **emoji** (string) - The emoji character. - **hexcode** (string) - The hexadecimal code of the emoji. - **group** (string) - The group of the emoji. - **subgroups** (string) - The subgroup of the emoji. - **annotation** (string) - The annotation of the emoji. - **tags** (string) - Tags associated with the emoji. - **openmoji_tags** (string) - OpenMoji-specific tags. - **openmoji_author** (string) - Author of the emoji. - **openmoji_date** (string) - Date of creation. - **skintone** (string) - Skintone modifier. - **skintone_combination** (string) - Skintone combination. - **skintone_base_emoji** (string) - Base emoji for skintone. - **skintone_base_hexcode** (string) - Base hexcode for skintone. - **unicode** (number) - Unicode version. - **order** (number) - Order number. - **openmoji_images** (object) - Contains image paths for black and color SVG files. ### Example ```javascript { emoji: 'πŸ˜€', hexcode: '1F600', group: 'smileys-emotion', subgroups: 'face-smiling', annotation: 'grinning face', tags: 'face, grin', openmoji_tags: 'smile, happy', openmoji_author: 'Emily JΓ€ger', openmoji_date: '2018-04-18', skintone: '', skintone_combination: '', skintone_base_emoji: '', skintone_base_hexcode: '', unicode: 1, order: 1, openmoji_images: { black: { svg: '/path/to/your/local/openmoji/black/svg/1F600.svg' }, color: { svg: '/path/to/your/local/openmoji/color/svg/1F600.svg' } } } ``` ``` -------------------------------- ### Simple one-off usage of OpenMoji font Source: https://github.com/hfg-gmuend/openmoji/blob/master/font/README.md Inline HTML to render a single emoji with the OpenMoji font. Requires the @font-face to be defined. ```html 🐈 ``` -------------------------------- ### Use OpenMoji instead of native emojis within text Source: https://github.com/hfg-gmuend/openmoji/blob/master/font/README.md CSS class and HTML paragraph that apply the OpenMoji font to text content, replacing native emojis. The CSS sets the font-family with fallbacks; the HTML uses the class. ```css .my-text-content { font-family: OpenMoji, Georgia, serif; } ``` ```html

At vero eos et 🐈 accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium πŸ• voluptatum deleniti atque corrupti quos dolores et quas πŸ‹.

``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.