4

Example of two characters: U+22FF, U+23BA... and many others.

Is this an encoding layer that I'm misunderstanding for iOS? Like, at some point it no longer can properly display codes beyond 22B...?

I'm capturing this in an NSString, and trying to simply update a text field. Something like

NSString *test = @"\u23ba";
[displayText setText:test];

This will display a standard type error like a box with a question mark in it, or just a box (depending on the font).

Is there a way to expand the unicode options for iOS? Because these can be displayed on my Mac. Or, is my only option some variant of the NSAttributableString route?

4

1 回答 1

2

U+22FF 和 U+23BA 是有效的代码点(分配给字符)。但它们仅受少数字体支持。因此,您应该首先检查正在使用或可用的字体。

例如,U+22FF 包含在 Asana-Math、Cambria、Cambria Math、Code2000、DejaVu Sans(奇怪的是,只有 Bold Oblique 字体)、FreeSerif、GNU Unifont、Quivira、Segoe UI Symbol、STIXMath、STX、Sun-ExtA、 Symbola、XITS、XITSMath。U+23BA 包含在 Cambria, Cambria Math, Code2000, FreeMono, FreeSerif, GNU Unifont, Quivira, Segoe UI Symbol, Sun-ExtA, Symbola。其中许多是免费字体。排版质量差异很大。Cambria 字体和 Segoe UI Symbol 是商业字体,随一些 Microsoft 产品一起提供。可能还有一些其他字体可以覆盖这些字符,但数量不多(我想是 Everson Mono,我目前没有)。

于 2013-10-10T20:51:44.640 回答