Amended Firemonkey Android Edit can input Emoji (emoticons Word)

Source: Internet
Author: User

Problem: Under Android platform, tedit input Emoji text, cannot display color (All Black), even if Edit.controltype = Platform is set as platform native control, still useless (real machine test Style and Platform is the same, and IOS platforms are different).

Correction Method:

Please make the source FMX. TextLayout.GPU.pas Copy to your project directory and make changes.

procedureTtextlayoutng.dodrawlayout (ConstAcanvas:tcanvas); var
... A little ...{+++>}Char:ucs4char;//Join this line of code by Aone (2016.11.18)begin... A little ... forK: =0 toLRun.Chars.Count-1 Do begin{+++>}Char: =lrun.chars[k];//Join this line code by Aone (2016.11.18) Rec:=Addorgetchar (Acanvas, Lrun.chars[k], chardic, Lrun.font); A little ...{---> coloredglyph: = tfontglyphstyle.colorglyph in Rec.Glyph.Style;//delete this code {+++>} //Add the following code by Aone (2016.11.18), taken from: FMX. Fontglyphs.iosColoredglyph: =(Char= $1f004)or(Char= $1F0CF)or(Char= $1f170)or(Char= $1f171)or(Char= $1f17e)or(Char= $1f17f)or(Char= $1f18f)or((Char>= $1f191) and(Char <= $1f19a))or(Char= $1f201)or(Char= $1f202)or(Char= $1f21a)or(Char= $1f22f)or((Char>= $1f232) and(Char <= $1f23a))or(Char= $1f250)or(Char= $1f251)or((Char>= $1f300) and(Char <= $1f320))or((Char>= $1f330) and(Char <= $1f393))or((Char>= $1f3a0) and(Char <= $1f3f0))or((Char>= $1f400) and(Char <= $1f43e))or(Char= $1f440)or((Char>= $1f442) and(Char <= $1f49f))or((Char>= $1f4a0) and(Char <= $1F4FC))or((Char>= $1f500) and(Char <= $1f53d))or((Char>= $1f550) and(Char <= $1f567))or((Char>= $1F5FB) and(Char <= $1f64f))or((Char>= $1f680) and(Char <= $1f6c5))or(Char= $2139)or((Char>= $2194) and(Char <= $2199))or(Char= $21a9)or(Char= $21AA)or(Char= $231a)or(Char= $231b)or((Char>= $23E9) and(Char <= $23ec))or(Char= $23f0)or(Char= $23f3)or(Char= $24c2)or(Char= $25AA)or(Char= $25ab)or(Char= $25b6)or(Char= $25c0)or((Char>= $25FB) and(Char <= $25fe))or(Char= $2600)or(Char= $2601)or(Char= $260e)or(Char= $2611)or(Char= $2614)or(Char= $2615)or(Char= $261d)or(Char= $263a)or((Char>= $2648) and(Char <= $2653))or(Char= $2660)or(Char= $2663)or(Char= $2665)or(Char= $2666)or(Char= $2668)or(Char= $267b)or(Char= $267f)or(Char= $2693)or(Char= $26a0)or(Char= $26A1)or(Char= $26AA)or(Char= $26ab)or(Char= $26BD)or(Char= $26be)or(Char= $26C4)or(Char= $26c5)or(Char= $26ce)or(Char= $26d4)or(Char= $26ea)or(Char= $26F2)or(Char= $26f3)or(Char= $26f5)or(Char= $26FA)or(Char= $26FD)or(Char= $2702)or(Char= $2705)or((Char>= $2708) and(Char <= $270f))or(Char= $2712)or(Char= $2714)or(Char= $2716)or(Char= $2728)or(Char= $2733)or(Char= $2734)or(Char= $2744)or(Char= $2747)or(Char= $274c)or(Char= $274e)or((Char>= $2753) and(Char <= $2755))or(Char= $2757)or(Char= $2764)or((Char>= $2795) and(Char = $2797))or(Char= $27b0)or(Char= $27BF)or(Char= $2934)or(Char= $2935)or((Char>= $2b05) and(Char = $2b07))or(Char= $2b1b)or(Char= $2b1c)or(Char= $2B50)or(Char= $2b55)or(Char= $3030)or(Char= $303d)or(Char= $3297)or(Char= $3299);{<+++}... A little ...End;

Effect:

Official related QC:

https://quality.embarcadero.com/browse/RSP-9899

Amended Firemonkey Android Edit can input Emoji (emoticons Word)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.