You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR completely refactors the emoji pack generation system to use JSON configuration files, enabling flexible support for multiple emoji sources, repository structures, and output formats while maintaining full backward compatibility.
Problem Statement
The original fluentui-emoji.py script was hardcoded to work specifically with Microsoft's FluentUI emoji repository with fixed:
Repository URL and structure expectations
File naming conventions and metadata processing
Output format (Minecraft resource packs only)
Limited style and skin tone handling
This made it difficult to:
Support other emoji repositories (Twemoji, Apple, etc.)
Handle different folder structures or metadata formats
Generate packs for different output formats
Customize file processing rules
Solution
New Configuration-Driven Architecture
Created a new emoji_pack_generator.py with a flexible JSON configuration system:
Wildcard Pattern Support: Use {style} and {skin_tone} variables in folder patterns to match different repository structures automatically.
Multiple Source Support: Easily add new emoji repositories by creating configuration files without code changes.
Flexible Output Formats: Extensible system for different pack formats (currently Minecraft, easily extensible).
Robust Error Handling: Comprehensive validation, detailed error messages, and graceful failure handling.
Commit/Branch Support: Download specific commits or branches for reproducible builds.
Backward Compatibility
The original fluentui-emoji.py script remains fully functional with:
All existing command-line arguments preserved
Optional --config parameter to use new system
Deprecation warnings guiding users to new approach
Legacy functions maintained for compatibility
Usage Examples
# New configuration-based approach
python emoji_pack_generator.py --config configs/fluentui-3d-only.json --download
# Generate specific style/skin tone
python emoji_pack_generator.py --config configs/fluentui-emoji.json --style 3D --skin-tone Dark
# Use specific commit
python emoji_pack_generator.py --config configs/fluentui-emoji.json --commit abc123 --download
# Legacy approach still works
python fluentui-emoji.py --download --style 3D --skin-tone Default
# Legacy with new config support
python fluentui-emoji.py --config configs/fluentui-emoji.json --style 3D
Files Added
emoji_pack_generator.py - New configuration-driven generator
configs/fluentui-3d-only.json - FluentUI 3D style configuration
configs/fluentui-emoji.json - Full FluentUI configuration
configs/twemoji-example.json - Example Twemoji configuration
CopilotAI
changed the title
[WIP] Start refactoring the codebase so that we can accept json configuration files that describe the, 1. repository+commit to pull from, 2. expected structure with wildcard support, 3 output structure any renaming that is needed for each png file. the json ...
Refactor emoji pack generator to use JSON configuration files
Aug 28, 2025
@copilot
please verify a working json config for twemoji from this repo url https://github.com/jdecked/twemoji
will close issue #1, it has png images in the path /assets/72x72/ and svg images in /assets/svg/
and also verify a working json config for noto-emoji from https://github.com/googlefonts/noto-emoji that will close issue #2 , it has png files inside /png/ in various resolutions like /png/32/ , /png/72/ , /png/128/ , /png/512/
@copilot please verify a working json config for twemoji from this repo url https://github.com/jdecked/twemoji will close issue #1, it has png images in the path /assets/72x72/ and svg images in /assets/svg/ and also verify a working json config for noto-emoji from https://github.com/googlefonts/noto-emoji that will close issue #2 , it has png files inside /png/ in various resolutions like /png/32/ , /png/72/ , /png/128/ , /png/512/
This file contains hidden or 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
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.
Overview
This PR completely refactors the emoji pack generation system to use JSON configuration files, enabling flexible support for multiple emoji sources, repository structures, and output formats while maintaining full backward compatibility.
Problem Statement
The original
fluentui-emoji.pyscript was hardcoded to work specifically with Microsoft's FluentUI emoji repository with fixed:This made it difficult to:
Solution
New Configuration-Driven Architecture
Created a new
emoji_pack_generator.pywith a flexible JSON configuration system:{ "name": "FluentUI Emoji Pack", "source": { "type": "github", "repository": "microsoft/fluentui-emoji", "branch": "main", "folder": "assets" }, "input_structure": { "metadata_file": "metadata.json", "image_folders": ["{style}", "{skin_tone}/{style}"], "image_extensions": ["png"], "styles": ["3D", "Color", "Flat"], "skin_tones": ["Default", "Dark", "Medium-Dark", "Medium-Light", "Light"] }, "output": { "type": "minecraft_resource_pack", "pack_format": 15, "description_template": "FluentUi {style}-{skin_tone} Emoji Resource Pack", "output_directory": "./packs/FluentUi-{style}-{skin_tone}-Emoji" } }Key Features
Wildcard Pattern Support: Use
{style}and{skin_tone}variables in folder patterns to match different repository structures automatically.Multiple Source Support: Easily add new emoji repositories by creating configuration files without code changes.
Flexible Output Formats: Extensible system for different pack formats (currently Minecraft, easily extensible).
Robust Error Handling: Comprehensive validation, detailed error messages, and graceful failure handling.
Commit/Branch Support: Download specific commits or branches for reproducible builds.
Backward Compatibility
The original
fluentui-emoji.pyscript remains fully functional with:--configparameter to use new systemUsage Examples
Files Added
emoji_pack_generator.py- New configuration-driven generatorconfigs/fluentui-3d-only.json- FluentUI 3D style configurationconfigs/fluentui-emoji.json- Full FluentUI configurationconfigs/twemoji-example.json- Example Twemoji configurationCONFIG_SCHEMA.md- Detailed configuration schema documentationREADME.md- Comprehensive usage guideTesting
Successfully tested with FluentUI emoji repository:
Future Extensibility
This architecture enables easy addition of:
The modular design separates concerns and makes the codebase much more maintainable and extensible for future emoji pack requirements.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.