-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode key names and file content support (Or, ASCII font based cultural symbols) #7238
Comments
For me it also compiles and works if I simply replace the code with the symbols:
I am not sure if it depends on the system though. It also doesn't work with every character. If I replace one flat with an emoji (🤩) it does not work. I guess that's because the font used on my system doesn't have the emoji. |
UTF-8 will be guaranteed to be accepted as an input by all C++23-compilant compilers as per https://wg21.link/P2295R6 Edit: |
Just a thought: Can we "embed" a non-unicode font or SVG symbols for these keys? I had tried replacing with unicode texts in the source file, but I got square blocks instead, when executing the LMMS binary. It may be due to that the machines I used did not have proper unicode fonts. If we could implement an embedded font file, these symbols would be ASCII like characters from that font, available to all machines; at the additional cost of new font file's disk size. |
Yes, we can add custom fonts via QFontDatabase::addApplicationFont("/path/to/font.ttf"); |
Just borrowed some glyphs from Tillana font | @itfoundry/tillana . I reordered the symbols into characters: A, B, C, D, E, F, G, H, I, J, K, L - as the 12 keys. Resized the numerals into smaller font size to mark the octave numbers. 0 , 1, 2, 3, 4, 5, 6, 7, 8, 9, *, . and a - sign. If it works with these symbols, it can work for any other language. :-) Expanded set of fonts: Notes: Font preview removed. Added more fonts. |
Font based system worked under Ubuntu. But here are new challenges:
There are at least 3 places that need new font information, and sharing keys: Important bookmarks: |
This could be implemented with an interface that replaces
The currently used "English" implementation would simply return the font of the The other implementations will return the font that was registered for them via |
Thank you @michaelgregorius. I am making a font for at least 3 notation names (cultures). For predefined single culture, it works. But to add more cultures, we might need an option to pick which system to display/use. Meanwhile, is it necessary to check a minimum height? lmms/src/gui/editors/PianoRoll.cpp Line 1026 in d5f5d00
I had to put the value "4" instead of "6" here, so that notation name got printed on the green note in the roll. Also, this picture is great to know related to this thread. :-) |
IMO the option should then be moved from the main menu into the preferences/settings. An additional combo box could be added which lets the users select the notation system that they want to use.
The check was added so that we do not render text that gets too tiny. See the commit message of 0dc2843. If you keep it as is then the text should get rendered if you increase the vertical zooming of the piano roll. |
I haven't checked, but does any of MuseScore's fonts contain the glyphs we're wanting? If so we may be able to use that. |
Just checked: Leland and Edwin - they are huge collection of symbols. I am looking for text based glyphs for readable notes. My current plan is to build limited font files, per culture for testing purpose. If it works, we can replace with higher quality glyphs from these fonts; even assuming symbols as a culture. Here is the glyph preview list: doremi-keys-for-lmms.ttf nashville-keys-for-lmms.ttf (not sure if it is correct) Here are the .birdfont files if anyone might be interested in improving these glyphs. |
Updates: Here is a proof that that it now works for the defined culture name (sargam in this case). It is based on embeddable font, and not unicode dependencies to have the missing glyphs. Some questions are about managing the file structure of these fonts and notation system, as well modifying the various parts of PianoRoll.cpp.
|
It should be a single file, allowing us to utilize the
If it's shipped with LMMS, then we just can check if the file exists in the place we expect and warn if missing.
This can be adjusted to set the size of the font based on the size we want through QFontMetrics probably.
Translations should take care of that.
This is the way: translations. |
What can be done to allow unicode based key names here?
The file should be able to compile when saved with Unicode Byte Order mark.
lmms/src/gui/editors/PianoRoll.cpp
Lines 123 to 125 in d5f5d00
#6162 Desiring unicode labels.
The text was updated successfully, but these errors were encountered: