[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to display an email subject with Apple emojis?


Le 27/12/2024 à 17:42, T Lee Davidson a écrit :
On 12/27/24 11:19, Charlie Ogier wrote:
Try this: -

Public Sub Form_Open()

   TextBox1.Font = Font["Ubuntu,150"]
   TextBox1.text = UnBase64("8J+OhPCfjrg=")

End

Charlie

I tried it without changing the TextBox font, and it worked no problem with Qt5/6. Interestingly though, trying it with a Label did not work fully. I got a tree but no guitar.

This code:
[code]
   Print "TextBox font: "; TextBox1.Font.ToString()
   TextBox1.Text = UnBase64("8J+OhPCfjrg=")
   Print "Label font: "; Label1.Font.ToString()
   Label1.Text = UnBase64("8J+OhPCfjrg=")
[/code]

Produced:
[output]
TextBox font: Noto Sans,10
Label font: Noto Sans,10
load glyph failed err=24 face=0x55e183c28e30, glyph=375
load glyph failed err=24 face=0x55e183c28e30, glyph=422
load glyph failed err=24 face=0x55e183c28e30, glyph=375
load glyph failed err=24 face=0x55e183c28e30, glyph=422
load glyph failed err=24 face=0x55e183c28e30, glyph=422
[/output]



I tried the following code:

  Print "TextBox font: "; TextBox1.Font.ToString()
  TextBox1.Text = UnBase64("8J+OhPCfjrg=")
  Print "Label font: "; Label1.Font.ToString()
  Label1.Text = UnBase64("8J+OhPCfjrg=")

on my Manjaro.

Apparently these unicode emoji are supported by GTK+, (i.e. Pango) whatver the font.

But for Qt5/Qt6, it displays something when using very specific fonts, and in the case the TextBox works badly. Otherwise it displays boxes (meaning "unknown glyph").

So I would say that emoji are not really supported by Qt at the moment?

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: How to display an email subject with Apple emojis?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
References:
How to display an email subject with Apple emojis?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: How to display an email subject with Apple emojis?Charlie Ogier <charlie@xxxxxxxxxx>
Re: How to display an email subject with Apple emojis?T Lee Davidson <t.lee.davidson@xxxxxxxxx>