Page 1 of 1

Accidental character in the Windows function Editor

Posted: Tue Apr 09, 2024 2:41 pm
by ray
Hi,
I am writing code relating to music, and am having a minor problem with the accidentals symbols '♭♮♯' (Unicode chars 9837 9838 9839) within the Windows function editor.

The following code appears in a function dealing with buttons to add them. Note the Captions:

Code: Select all

 f n s←'♭♮♯'
  'Score.sharp'⎕WC'Button'(push)('Caption' ' ♯ ')('Posn'(frow(uw[2])))('Event' 'Select' 1)('FontObj' 'font')
 'Score.flat'⎕WC'Button'(push)('Caption' ' ♭ ')('Posn'(frow(uw[3])))('Event' 'Select' 1)('FontObj' 'font')
 'Score.natural'⎕WC'Button'(push)('Caption' ' ♮  ')('Posn'(frow(uw[4])))('Event' 'Select' 1)('FontObj' 'font')

I am using copying and pasting to get these glyphs into the editor.

It all appears to work, but within the editor these symbols they frequently convert to a small black square, but still appear correctly on the button within the form when displayed on screen.

Currently, every time I open the function in the editor, the final ' ♮ ' appear as the small black square. (NOTE I copied that string from the editor and pasted to here where it appears correctly.)

I know I can simply replace these glyphs via using

Code: Select all

⎕UCS 9837 9838 9839
, but the function is much easier to read if I can use the glyphs directly.

Any suggestion ?

Thanks Ray

Re: Accidental character in the Windows function Editor

Posted: Wed Apr 10, 2024 8:17 am
by Vince|Dyalog
Hi Ray,

I can see those characters OK in Dyalog 19.0 and font APL385 Unicode on MS Windows 10.

What version are you running?

What version of Windows are you running on?

I would also suggest trying another font.

Arial or Lucida Sans Unicode, just to see if those characters display.

I also use Iosveka. You can find a list of fonts to use for APL here:
https://aplwiki.com/wiki/Fonts

⎕se.⎕wg 'font'
Iosevka Term SS10 MdEx 40 1 0 0 500 0 0

Regards,

Vince