FigmaToCode icon indicating copy to clipboard operation
FigmaToCode copied to clipboard

Text preview shorter than the selected text field

Open mimshwright opened this issue 9 months ago • 2 comments

I noticed that a text field I selected has the last line of text cut off in preview. This happens on all layout types (fixed size, auto width, auto height)

Image

Changing the height of the text box changes the preview size. But the preview size is always smaller in height than the original.

Image

mimshwright avatar Mar 11 '25 14:03 mimshwright

Seems to be because of the font :(

On Tue, Mar 11, 2025, 11:47 Mims H. Wright @.***> wrote:

I noticed that a text field I selected has the last line of text cut off in preview. This happens on all layout types (fixed size, auto width, auto height) Screenshot.2025-03-11.at.15.39.13.png (view on web) https://github.com/user-attachments/assets/73b722f8-70da-4428-ad64-424676c75cab

Changing the height of the text box changes the preview size. But the preview size is always smaller in height than the original. Screenshot.2025-03-11.at.15.44.39.png (view on web) https://github.com/user-attachments/assets/b5b030c7-c2a9-4c39-8c1b-eb484dad58b7

— Reply to this email directly, view it on GitHub https://github.com/bernaferrari/FigmaToCode/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVXFIBWWLXFHZPDARTF7L2T3ZP5AVCNFSM6AAAAABYZDWKGKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEYTAOBUGE3TMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: mimshwright]mimshwright created an issue (bernaferrari/FigmaToCode#203) https://github.com/bernaferrari/FigmaToCode/issues/203

I noticed that a text field I selected has the last line of text cut off in preview. This happens on all layout types (fixed size, auto width, auto height) Screenshot.2025-03-11.at.15.39.13.png (view on web) https://github.com/user-attachments/assets/73b722f8-70da-4428-ad64-424676c75cab

Changing the height of the text box changes the preview size. But the preview size is always smaller in height than the original. Screenshot.2025-03-11.at.15.44.39.png (view on web) https://github.com/user-attachments/assets/b5b030c7-c2a9-4c39-8c1b-eb484dad58b7

— Reply to this email directly, view it on GitHub https://github.com/bernaferrari/FigmaToCode/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVXFIBWWLXFHZPDARTF7L2T3ZP5AVCNFSM6AAAAABYZDWKGKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEYTAOBUGE3TMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bernaferrari avatar Mar 11 '25 17:03 bernaferrari

Besides the font, I found that preview had a 2px wrong value. Should be better now.

bernaferrari avatar Mar 12 '25 04:03 bernaferrari