Recent

Author Topic: [SOLVED] LAMW - UTF-8 character in jTextView  (Read 335 times)

Alcatiz

  • New Member
  • *
  • Posts: 13
[SOLVED] LAMW - UTF-8 character in jTextView
« on: June 18, 2025, 11:36:29 am »
Hi all!

I'm trying to display a UTF-8 character in a jTextView control:
Code: Pascal  [Select][+][-]
  1. TextView1.Text := #9786;
I'm using a jTextView to display a counter, and when the counter reaches 0 a smiley is directly displayed in place of the numbers.

In any classical Windows or Linux application using TLabel it displays a smiley, but in my Android app it doesn't work, only a '?' is displayed. Any idea on who to do it?
« Last Edit: June 20, 2025, 05:09:19 pm by Alcatiz »

dinglerod

  • Newbie
  • Posts: 1
Re: LAMW - UTF-8 character in jTextView
« Reply #1 on: June 20, 2025, 05:26:27 am »
It looks like your font is missing that glyph.

Alcatiz

  • New Member
  • *
  • Posts: 13
Re: LAMW - UTF-8 character in jTextView
« Reply #2 on: June 20, 2025, 05:08:51 pm »
Thanks for your reply, you're certainly right. I didn't know it was possible to use a particular font, until I found some code in one of the demos.
So I could solve the problem using a web font stored in the Assets directory:
Code: Pascal  [Select][+][-]
  1. TextView1.SetFontFromAssets('materialdesignicons-webfont.ttf');
  2. TextView1.Text := Self.ParseHtmlFontAwesome('F2E7');   (* Smiley *)

 

TinyPortal © 2005-2018