Skip to main content
LiveCode file icon

emojiSwapLib

MIT   license

About

THE PROBLEM (Bug 22982) WE ARE SOLVING:   PDF creation on mobile fails if the text being rendered contains an emoji. This library (EmojiSwapLib) is a workaround that takes a field reference or htmlText and removes any emojis, replacing them with identical imageSource that mimics the emojis.

The current version now scales the image to match each emoji's text size. Also the previous version attempted to make a test PDF. The current version no longer does this, making it not only faster but also possible to call the emojiSwapLib from inside an "open printing to pdf" block. The library is MIT license so feel free to make it better!

Suggestions and improvement code are most welcome!

Download

  version 2.0.3    

History

  • version 2.0.3   November 2026 - Every emoji imagesource is now scaled to match the expected font size. The library itself no longer calls "open printing to pdf"
  • version 1.2.1  December 2020    - bug fixes
  • version 1.2  December 2020    - improved accuracy and slight additional reduction to the size of the library
  • version 1.1  December 2020    - simplified use, improved speed and significant reduction to the size of the library
  • version 1.0.r  November 2020    - fixed several bugs, added the option of passing htmlText rather than a field reference.
  • version 1.0.m  November 2020     - announced
  • version 0.8.x  November 2020     - proof of concept

Written with LiveCode  

If you like this free content:  Buy me a coffee on Ko-fi