How to display greek characters in labels of GUI?

I would like to use unicode characters as listed here in my slider labels:

Letter   Description  Escape-Sequence
-------------------------------------
A        Alpha        \u0391
B        Beta         \u0392
Γ        Gamma        \u0393
Δ        Delta        \u0394
Ε        Epsilon      \u0395
Ζ        Zeta         \u0396
Η        Eta          \u0397
Θ        Theta        \u0398
Ι        Iota         \u0399
Κ        Kappa        \u039A
Λ        Lambda       \u039B
Μ        Mu           \u039C
Ν        Nu           \u039D
Ξ        Xi           \u039E
Ο        Omicron      \u039F
Π        Pi           \u03A0
Ρ        Rho          \u03A1
Σ        Sigma        \u03A3
Τ        Tau          \u03A4
Υ        Upsilon      \u03A5
Φ        Phi          \u03A6
Χ        Chi          \u03A7
Ψ        Psi          \u03A8
Ω        Omega        \u03A9
Letter   Description  Escape-Sequence
-------------------------------------
α        Alpha        \u03B1
β        Beta         \u03B2
γ        Gamma        \u03B3
δ        Delta        \u03B4
ε        Epsilon      \u03B5
ζ        Zeta         \u03B6
η        Eta          \u03B7
θ        Theta        \u03B8
ι        Iota         \u03B9
κ        Kappa        \u03BA
λ        Lambda       \u03BB
μ        Mu           \u03BC
ν        Nu           \u03BD
ξ        Xi           \u03BE
ο        Omicron      \u03BF
π        Pi           \u03C0
ρ        Rho          \u03C1
σ        Sigma        \u03C3
τ        Tau          \u03C4
υ        Upsilon      \u03C5
φ        Phi          \u03C6
χ        Chi          \u03C7
ψ        Psi          \u03C8
ω        Omega        \u03C9

If my GUI labels are implemented like:

std::make_unique<AudioParameterFloat>(id_ViscosityBase, "η 1", NormalisableRange<float>(-150.f, 150.f), 95.f),

How do I get that Greek letter to actually show up in the label? I’m on Windows. Currently any greek characters I put in the label there just come out as ? in the display.

Tried using the escape codes listed but they fail.

Thanks.

You need to use a font that supports those characters. Also you may want to use the utf-8 string literal helper from the Projucer tools menu to convert the desired character into UTF-8 and wrap it into CharPointer_UTF8 (or whatever that thing is called)

But it’s probably not a good idea to use non ASCII stuff for parameters because DAWs won’t be able to display those characters either.

Even ° and -∞ won’t work in Live - haven’t tested other DAWs

What happens in that case in Live? Is there a crash or the display shows some rubbish characters? (sorry I don’t have a copy around to test with)

rubbish

they don’t work with vst3 but do with au, see this thread which has a patch for the vst3 issue.

1 Like

Thanks.