Hi again. Thanks for trying to recreate the bug. I’ve done some more investigation and have a few more things to report.
I’m running my tests now just with one letter and two diacritics: à̃
, which on the IPA keyboard is
the following keystrokes: a
@
1
@
~
.
I’ve discovered that CotEditor has a helpful tool that lets you inspect what Unicode code points a selected character has. You can find it by selecting a letter, then doing one of the following
- Main Menu → Text → Inspect Character
- Context Menu → Inspect Character
- Keyboard shortcut: Command + Option + I
Using this, I can confirm that typing à̃
with the IPA keyboard results in the decomposed version, with three code points:
If I copy and paste this into a Bike code block, it doesn’t display correctly using the monospace font the app uses:
If I copy and paste it out of Bike and back to CotEditor, I can confirm that no normalization has occurred, and it still is the decomposed version using three code points:
The test I did was to paste the same letter from CotEditor into this website (https://unicodelookup.com), which also provides Unicode information for inputted text. Surprisingly, this does perform some normalization, and it says that it’s now partially precomposed. The a
and ̀
(Combining Grave Accent) have been normalized to the precomposed à
Latin Small Letter a with Grave), while the Combining Tilde has been left decomposed:
If I copy the letter that I had originally pasted in the input box on the Unicode Lookup and then paste that back into CotEditor, I can confirm that just pasting into Safari has performed the normalization:
I’ve tried pasting the same decomposed version from CotEditor into input text boxes on multiple websites in Safari, and then copying and pasting it back to CotEditor, and, so far, the normalization is always performed.
Interestingly, typing into the input box on the Unicode Lookup website actually results in the site reporting the decomposed version:
You can also see in the screenshot that the font they’re using in the input box displays the decomposed version incorrectly.
If I copy and paste the typed, decomposed letter from the input box on the website into CotEditor, I can confirm that no normalization occurs in CotEditor:
Next, I tried pasting the partially precomposed version (remember, it ends up being two code points) from Safari or CotEditor into a code block in new, blank Bike document, and the monospace font displays it more correctly (the line height might be off, but it’s definitely better):
If I copy and paste that from Bike to CotEditor, I can confirm again that no normalization takes place, and it remains two code points:
Next, I discovered something a bit surprising given the results so far: If I paste the partially precomposed version into the code block in the first Bike document that already contains the decomposed version, Bike then displays the decomposed and precomposed characters in the same way.
I can confirm that no normalization occurred by copying and pasting the originally decomposed version from Bike back into CotEditor:
The precomposed version that was pasted in the video also does not undergo any normalization in Bike, which can be confirmed by copying and pasting it back to CotEditor:
At this point, I asked, what happens if I paste the decomposed version into the second document hat has only the precomposed version. The same thing happens, the characters display correctly, and I can confirm by copy and pasting into CotEditor that now normalization takes place.
Sorry for the long post. I’m not sure what that means for Bike.
If you type à̃
using the IPA keyboard in CotEditor, does the inspector show that it is the decomposed version? Does pasting that letter into Bike display correctly on your machine? What about the partially precomposed version?
It would also be interesting to see how things are displayed when the bug for typing decomposed characters is fixed. Will it display incorrectly at first and then be fixed in some way after pasting or typing a precomposed character.
One last test I did was to change the main font for Bike to a monospaced font (Libertinus Mono) and try it without using code blocks. As you can see, the decomposed version appears much more like the precomposed version, nearly identical if not completely so.
So, different fonts do display better, at least in certain circumstances. So I think long-term, being able to set the font in a stylesheet or by other means would be helpful.
At this point, being able to type the decomposed characters directly in Bike would be most useful, and might make the font problem less of an issue.
Thanks again for all the work you’ve put into such a great app, and for taking the time to explore this issue with me.