Search Unity

Native Emoji

Discussion in 'UGUI & TextMesh Pro' started by ypatelzynga, Sep 17, 2018.

  1. ypatelzynga

    ypatelzynga

    Joined:
    Aug 30, 2018
    Posts:
    9
    hi, I have watched handful of your youtube video about TMP. I am using Unity 2018 version which support TMP. i am working on chat system which require native emoji support. I am wondering if you could show me how to include native emoji in TMP would be very helpful. It seems like i need to search through input string and replace native emoji unicode with <sprite> to be displayed in chat window or is there better way? If some one has a code to support emoji please share
     
    makaka-org likes this.
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See my reply to your other post about this.

    In short, you can assign Unicode values to the sprites in the Sprite Assets and as such as these Unicode values are typed on a device / keyboard, the appropriate sprite / emoji will be displayed without having to use the <sprite> tag.

    BTW: Sprite assets are now part of the fallback system so when a Font Asset doesn't include a certain character, TMP will search the following resources in the following order.

    1) Primary Font Asset.
    2) Recursively through the fallback font assets assign to the primary.
    3) The Sprite Asset assigned to the text object and any fallback sprite asset potentially assigned to it
    4) The general fallback font assets assigned in the TMP Settings.
    5) The sprite asset and its potential fallbacks assigned in the TMP Settings
    6) The default font asset
    7) Missing character.
     
  3. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    Did you mean that user needs to create their own sprite asset and map the unicode the sprite enties manually?

    How about if the TMP could directly render the glyph from an emoji ttf file such as https://www.google.com/get/noto/#emoji-zsye-color ?
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The ability to raster and extract colored glyphs from font files is one of the features that will be added to the dynamic system.
     
  5. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    Does this dependent on new version of Unity engine?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It does require changes to the FontEngine which is part of the Unity Engine.

    Most likely these features will be in 2019.x but I will try to get approval to make them available in 2018.4.
     
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,166
  8. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,166
    Did it solved now? Is this covered in dynamic sdf feature?
     
    firstuser likes this.
  9. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    firstuser likes this.
  10. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,166
  11. frkssk

    frkssk

    Joined:
    Mar 7, 2017
    Posts:
    3
    Any news about it @Stephan_B ? (especially in 2018.4)