Open
Conversation
**New file: textFormatter.ts** - Implements text formatting logic for Figma text nodes - Handles varying font weight, font styles, and text decoration - Processes StyleOverrideTable and CharacterStyleOverrides data - Groups consecutive characters with identical styling into HTML spans **Updated: simplify-node-response.ts** - Integrated textFormatter.ts into text processing pipeline - Added import and function call for buildSimplifiedText **Current limitations:** - Takes base style from first character of paragraph - Mixed formatting within single lines not fully working - Style comparison/grouping logic needs refinement **Progress toward fixing issue GLips#140** - Successfully parses Figma's character-level style override data - Generates HTML spans with inline CSS styles - Works for uniform styling (all bold, all italic, etc.) - Foundation in place for complete mixed formatting support
**New file: textFormatter.ts** - Implements text formatting logic for Figma text nodes - Handles varying font weight, font styles, and text decoration - Processes StyleOverrideTable and CharacterStyleOverrides data - Groups consecutive characters with identical styling into HTML spans **Updated: simplify-node-response.ts** - Integrated textFormatter.ts into text processing pipeline - Added import and function call for buildSimplifiedText **Current limitations:** - Takes base style from first character of paragraph - Mixed formatting within single lines not fully working - Style comparison/grouping logic needs refinement **Progress toward fixing issue GLips#140** - Successfully parses Figma's character-level style override data - Generates HTML spans with inline CSS styles - Works for uniform styling (all bold, all italic, etc.) - Foundation in place for complete mixed formatting support
…od/Figma-Context-MCP into mixed-text-formatting
feat: handle uniform and mixed text formatting in textFormatter - Add separate logic paths for uniform vs mixed formatting - Process uniform styling from base node style properties - Process mixed formatting using StyleOverrides + StyleTable - Fix fontWeight detection to check > 400 threshold
Author
|
Hi @GLips , |
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
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.
feat: handle uniform and mixed text formatting in textFormatter