Displaying Musical Unicode Symbols in iOS UI with Swift - ios

I am currently developing an iOS app that works a lot with musical symbols. the symbols I would like to use are found on this page:
http://unicode-table.com/en/blocks/musical-symbols/
I am trying out a few examples like assigning the text directly to the label. So this is what I see in Xcode's interface builder:
And this is what I see in the simulator:
I also tried assigning it programatically (Swift code):
label.text = "\u{1D15D}"
But no luck that way either. However, if I send this to the console with println() the note character is correctly printed in the console.
Just in case I tried with a few system fonts and the result was the same (Default, Arial, Verdana and Times New Roman)
So my question/questions would be: Am I doing something wrong? Are these characters not supported by iOS' interface elements like UILabels? Or maybe the problem is in the font?
I would appreciate some help here :) let me know if you need more information than what I provided here.

This is a problem with the font. Very few fonts contain the musical symbols of Unicode. The “UFO” symbols that you see are probably generic symbols for “strange” characters not present in the font. You may need to find a suitable free font and try to bundle it with your application.
A few fonts contain at least some of the musical symbols. The most commonly known of them, FreeSerif, Quivira, and Symbola are listed (with samples) at the Fileformat.info site on page MUSICAL SYMBOL WHOLE NOTE (U+1D15D) Font Support. There is also the Musica font downloadable from the page Unicode Fonts for Ancient Scripts. (The common musical symbols aren’t that ancient, but the font contains also Byzantine musical symbols.)

Related

What's the difference between iOS 12 and iOS 13 when it comes to including emoji via its code point

Before we start, I'd like to clarify...
This question isn't about how to include emoji on labels. I'm aware that has been asked and answered before. I am able to get the emoji on the label just fine.
This question isn't about whether we can/should include emoji on labels. I am aware of the issues around that too. We'll discuss as a team whether we want to proceed with emoji, but it doesn't make me any less curious about the issue below.
With the disclaimers out of the way, our situation is as follows: We have an iOS app that deploys back to iOS 12. In it, we'd like to include the warning sign on a UILabel to signal certain situations. The text of the label comes from this bit of code (including picture, because pasting emoji doesn't come through):
This line isn't setting someLabel.text directly but it's the relevant bit. I can promise you that surrounding code simply prepends this snippet to other text and slaps it onto a label.
The first character of that literal string at the end of the line is the "warning sign" emoji inserted into the source code via hitting Ctrl+Cmd+Space and choosing it from the resulting picker. Then we have the unicode code point \u26A0.
I get the following when this code runs:
At this point I'm really curious about...
What changed between iOS 12.4 and 13.7 such that the same source code produces different output? Was the different treatment of unicode code points announced somewhere on some release notes?
Is one side somehow "more correct"? Does the "yellow-triangle-with-black-exclamation-in-it" symbol and \u26A0 technically represent different things, iOS 12 mistakenly visualized them as the same, and iOS 13 fixed that issue? Or vice versa; they are actually meant to represent the same thing, iOS 12 did so, and iOS 13 broke something? Or does the concept of correctness not even apply, since they are different representations?
Is there any code point I can type into my source file (e.g. \u<something>) that will render as the yellow-triangle-with-black-exclamation-in-it emoji consistently on iOS 12 and later? If so, what is it? If not, is using the actual emoji in my source code the only way to achieve this?
There are two variants, 26a0fe0f and 26a0fe0e. The former is the emoji variant; the latter is the text variant. In iOS 13 you are using both of them. I don't know why it chooses the second one as a fallback in iOS 13 but the first one as a fallback in iOS 12; the iOS 13 behavior seems more correct to me.
I think I figured it out, but leaving question and answer up in case it helps others.
The crux of the issue is that the "yellow-triangle-with-black-exclamation-in-it" symbol and the "black-bordered-triangle-with-black-exclamation" symbols are not the same entity. We see these in the character viewer built into macOS:
And sure enough, the representation \u26A0\uFE0F renders as "yellow-triangle-with-black-exclamation-in-it" on both iOS versions:
If \u26A0 wasn't supposed to be the "yellow-triangle-with-black-exclamation-in-it" emoji, I still can't explain why it renders as such on iOS 12...
Credit actually belongs to user matt. He had a comment which hinted at these being different, which led me down this path. The comment is no longer there for some reason (got deleted?) so I don't know how to properly attribute.

iOS 13 not displaying Russian Ruble (₽) unicode symbol

I'm having issues displaying the ₽ symbol on iOS 13.x.x. It seems to be working on on iOS12, but when I use a device that had 13 installed, the unicode character shows up as an empty square.
https://www.fileformat.info/info/unicode/char/20bd/browsertest.htm
Everything works fine on desktop
iOS 12 renders the character properly
iOS 13 renders empty square
When I set the CSS font-family to only a few options ('system-ui' is one), the character displays properly
To compare these, opened an empty tab and only added the symbol to the body of the HTML. This issue persisted. Just to be clear, when I have no CSS or extra markup on the page, this issue is showing up. Has anyone run into this? Did Apple remove unicode characters from some of their fonts?
iOS12:
iOS13:
I've finished my research and I'd like to say that the issue is exclusively in iOS and WKWebView. After an update to 13 version, iOS stopped recognizing a Ruble symbol ₽ and, for example, Azerbaijani manat ₼ and Check Mark Unicode Character (\u{2713}) in certain font sets.
This issue affected thousands of web pages even huge brands. So just changing a font to specific ones solved the issue, but it's an workaround sure.
the same issues for iOS13: 1, 2
As a workaround you can wrap separately the ruble sign in a font containing it. Helvetica Neue - contains the ruble sign ans it's preinstalled IOS font. For PC users you can use your default font like fallback.
span.ruble-icon {
font-family: "Helvetica Neue", sans-serif;
}
<span class="ruble-icon">₽</span>
I'm also faced this, iOS 13 not displaying Russian Ruble (₽) Unicode symbol :-
It's the default font on Macs, but rare on PCs. Since it's not technically web-safe, some people may have it and some people may not. If you want to use a font like that, without using #font-face, you may want to write it out in several different ways because it might not work the same for everyone."Helvetica Neue" it's working for me better try this
example:font-family: "Helvetica-Cyrillic", "Helvetica", "Helvetica Neue" ;

Font usable in Windows but not in iOS

I am making an app that writes/plays byzantine music and I 'd like to port it to iOS.
For that I 've been using a family of fonts that work well under windows, and also FontCreator does not show a problem with them.
However, under iOS, they do load ok with UIFont* but they are not usable, that is, when I type the character '1', the '1' in system font is displayed instead of that font.
What could be wrong?
For reference, I 've attached the font: http://www.michaelchourdakis.com/temp/ez.ttf .
Note that the font isn't loaded in the Font Book as well. So there must be a problem in the font.
There seems to be something wrong with your font. If you try install it on Mac OS (Mavericks), it shows following errors:
EZ Psaltica
'name' table usability
'sfnt' required tables
'name' table structure
I guess iOS has the same problem when using this font.
Where did you get that font from? Do you know who created it? If yes, maybe these errors mean something to him and he can fix the font? Once you get to install it correctly on Mac OS, chances are higher that it will also work on iOS, I guess.

Unicode system fonts for ipad

I'd like to essentially create a uilabel with chinese on it. Do I need a unicode font for this, and is there a system font I can use on the iPad? Assuming so, would I need to look up the escape character to denote it if I wanted to simply hardcode it, ie use the \u type of notation? Please assume I'm pretty clueless about unicode, as this question probably implies.
For a global product/system like this, unicode support is a very basic requirement. iOS device support it natively, including unicode fonts and codepages. No extra effort on this is needed.
For unicode string literals used in source files(I assume XCode here also), I haven't try yet, but my coworkers seems have no problem with it.
Some google results on this you can refer:
http://www.cocoabuilder.com/archive/cocoa/97208-cant-use-utf-8-source-files-false-string-interpretation.html
http://www.cocoabuilder.com/archive/cocoa/224023-unicode-in-constant-nsstrings.html

LaTeX support with Movable Type 5?

Is there latex math support with movable type 5?
Saying the unobvious; but Movable Type 5 cannot be embedded into LaTeX.
Saying the obvious, the other way around:
It is possible using Google's LaTeX image output: See my article on this website http://sites.google.com/site/gencoreoperative/index/articles-and-hacks/google-s-latex
I'll copy some stuff over here, if the link may ever be dead:
http://www.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chco=000000&chl=e^z=\sum^{\infty}_{n=0}\frac{z^n}{n!}
Where chl is your latex, cht is "TeX" and chf and chco are font, style and color attributes.
Update: not sure if it works on sites external from Google too...
http://bitbucket.org/alex_mikhalev/latex/ hasn't been updated in a year. not sure about MT5 support, as I didn't see a mention of version compatibility.

Resources